diff options
author | Brad King <brad.king@kitware.com> | 2013-10-21 19:31:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-21 19:40:26 (GMT) |
commit | 2d0287dd5e12f57085d01badc9c0696924b61d94 (patch) | |
tree | 2c6cef9eb5d2fb61c53ffb94d0f156e21f756547 /Tests | |
parent | 7b9ae406f3f2fbe4de9d075a50ec0daae4fa1274 (diff) | |
download | CMake-2d0287dd5e12f57085d01badc9c0696924b61d94.zip CMake-2d0287dd5e12f57085d01badc9c0696924b61d94.tar.gz CMake-2d0287dd5e12f57085d01badc9c0696924b61d94.tar.bz2 |
cmRST: Process literal blocks after paragraphs ending in '::'
Teach cmRST to recognize non-markup lines ending in '::' followed by a
blank line as starting a literal block. Record the whole block as if it
were a literal block directive and print it just like a code block.
Extend the CMakeLib.testRST test to cover such cases.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/testRST.expect | 17 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.rst | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 28981bf..9bd0ca4 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -53,6 +53,23 @@ More CMake Module Content endif() # |not replaced in literal| +A literal block starts after a line consisting of two colons + +:: + + Literal block. + Common Indentation Removed + # |not replaced in literal| + +or after a paragraph ending in two colons:: + + Literal block. + Common Indentation Removed + # |not replaced in literal| + +but not after a line ending in two colons:: +in the middle of a paragraph. + substituted text with multiple lines becomes one line End of first include. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index 46ec771..5cb6d91 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -66,6 +66,23 @@ Generator :generator:`Some Generator` with space. endif() # |not replaced in literal| +A literal block starts after a line consisting of two colons + +:: + + Literal block. + Common Indentation Removed + # |not replaced in literal| + +or after a paragraph ending in two colons:: + + Literal block. + Common Indentation Removed + # |not replaced in literal| + +but not after a line ending in two colons:: +in the middle of a paragraph. + .. |substitution| replace:: |nested substitution| with multiple lines becomes one line |