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.
This commit is contained in:
Ben Boeckel
2026-09-04 20:02:58 -04:00
parent 9ed206876f
commit 119b2e62f8
+1 -1
View File
@@ -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])?\\|)(__|_|))"