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])?\\|)(__|_|))" diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 1f33ae0ba2..5553dad2cd 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -33,6 +33,9 @@ Inline cref ``Link_Text_``. Inline link Link Dest. Inline link Link Text. Inline link Link Text . +Inline link anon Link Dest. +Inline link anon Link Text. +Inline link anon Link Text . Inline literal ``__`` followed by inline link Link Text. Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index f8e55bccf1..e10cd63936 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -40,6 +40,9 @@ Inline cref :cref:`Link_Text_ `. Inline link `Link Dest`_. Inline link `Link Text `_. Inline link `Link Text \ `_. +Inline link anon `Link Dest`__. +Inline link anon `Link Text `__. +Inline link anon `Link Text \ `__. Inline literal ``__`` followed by inline link `Link Text `_. Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.