summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-21 18:53:25 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-21 18:56:26 (GMT)
commit7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274 (patch)
treeb525f98d473db4ff36f499fd0652ba136824c210 /Tests
parentbf02e750796c6b42b0e9d39ba322cd5191489a0e (diff)
downloadCMake-7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274.zip
CMake-7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274.tar.gz
CMake-7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274.tar.bz2
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')
-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 6a89002..28981bf 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 f7059cf..46ec771 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|