summaryrefslogtreecommitdiff
path: root/Tests/CMakeLib
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-21 14:53:25 -0400
committerBrad King <brad.king@kitware.com>2013-10-21 14:56:26 -0400
commit7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274 (patch)
treeb525f98d473db4ff36f499fd0652ba136824c210 /Tests/CMakeLib
parentbf02e750796c6b42b0e9d39ba322cd5191489a0e (diff)
downloadcmake-7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274.tar.gz
cmRST: Do not process inline markup in code-block literals
Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock method internals into an OutputMarkupLines helper. Pass through it a new "inlineMarkup" parameter and teach OutputLine to understand it. When false, do not process inline markup. Extend the CMakeLib.testRST test to cover the two cases.
Diffstat (limited to 'Tests/CMakeLib')
-rw-r--r--Tests/CMakeLib/testRST.expect2
-rw-r--r--Tests/CMakeLib/testRST.rst3
2 files changed, 5 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 6a890021bf..28981bf2ad 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -45,11 +45,13 @@ More CMake Module Content
Parsed-literal included without directive.
Common Indentation Removed
+ # replaced in parsed literal
# Sample CMake code block
if(condition)
message(indented)
endif()
+ # |not replaced in literal|
substituted text with multiple lines becomes one line
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index f7059cf4e1..46ec771238 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -26,6 +26,7 @@ Variable :variable:`VARIABLE_<PLACEHOLDER> <target>` with trailing placeholder a
Generator :generator:`Some Generator` with space.
.. |not replaced| replace:: not replaced through toctree
+.. |not replaced in literal| replace:: replaced in parsed literal
.. toctree::
:maxdepth: 2
@@ -55,6 +56,7 @@ Generator :generator:`Some Generator` with space.
Parsed-literal included without directive.
Common Indentation Removed
+ # |not replaced in literal|
.. code-block:: cmake
@@ -62,6 +64,7 @@ Generator :generator:`Some Generator` with space.
if(condition)
message(indented)
endif()
+ # |not replaced in literal|
.. |substitution| replace::
|nested substitution|