From 35a4c71f9656e7ec43692e8fe967ae99a9338d2f Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Fri, 20 Dec 2024 11:43:55 +0100 Subject: [PATCH] generate_descriptor_pages.main.kts: Fix case when an element link is before an attribute link --- .github/scripts/generate_descriptor_pages.main.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] }