From 119b2e62f88a71df7c0da637b16255d39ab6591c Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 4 Sep 2026 20:02:58 -0400 Subject: [PATCH] cmRST: match anonymous hyperlink syntax Previously, the `cmake --help-command string` output would have an extra trailing `_` after `string(JSON)` subcommand names because they are anonymous hyperlinks in the source. Support matching a double underscore so that it is removed in the `--help-*` output. --- Source/cmRST.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index f931f48c80..c1c0b68b1c 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -40,7 +40,7 @@ cmRST::cmRST(std::string docroot) "cmake-workflow-option|cpack-option|ctest-option|" "ctest-dashboard-option" "):`(<*([^`<]|[^` \t]<)*)([ \t]+<[^`]*>)?`") - , InlineLink("`(<*([^`<]|[^` \t]<)*)([ \t]+<[^`]*>)?`_") + , InlineLink("`(<*([^`<]|[^` \t]<)*)([ \t]+<[^`]*>)?`__?") , InlineLiteral("``([^`]*)``") , Substitution("(^|[^A-Za-z0-9_])" "((\\|[^| \t\r\n]([^|\r\n]*[^| \t\r\n])?\\|)(__|_|))"