diff --git a/.github/scripts/generate_descriptor_pages.main.kts b/.github/scripts/generate_descriptor_pages.main.kts index ed7ecfeaf..6545df9d7 100755 --- a/.github/scripts/generate_descriptor_pages.main.kts +++ b/.github/scripts/generate_descriptor_pages.main.kts @@ -399,7 +399,7 @@ fun String.cleanupElementLinks(): String { } fun String.removeAttributeLinks(): String { - val attributeLinkRegex = Regex("\\[(.*?)]\\(#attribute:.*?\\)") + val attributeLinkRegex = Regex("\\[([^\\[\\]]*?)]\\(#attribute:.*?\\)") return attributeLinkRegex.replace(this) { matchResult -> matchResult.groupValues[1] }