diff options
author | Joachim Wuttke (o) <j.wuttke@fz-juelich.de> | 2018-10-10 07:39:17 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-10-18 20:25:34 (GMT) |
commit | fc7ee1ca459c3b231aa1fb64aeeaee590c019513 (patch) | |
tree | 77525a7817e1d2be7cb55c91ff0357bc9e284fc4 /Help/manual | |
parent | 74b3eacdc755bc056aac65bf5c0b45aa02d097d4 (diff) | |
download | CMake-fc7ee1ca459c3b231aa1fb64aeeaee590c019513.zip CMake-fc7ee1ca459c3b231aa1fb64aeeaee590c019513.tar.gz CMake-fc7ee1ca459c3b231aa1fb64aeeaee590c019513.tar.bz2 |
Help: Override pygments CMakeLexer to support <..> and [..]
* The code snippets in the docs consist of CMake code mixed
with syntax definition punctuation like < > [ ] ... Therefore
a pure CMake lexer is inadequate. Here it is replaced by a
CMake syntax definition parser.
* Fixed syntax definition snippets in FindPkgConfig.cmake to
make best use of syntax highlighting. This source file is the
hardest to support because it contains comparison operators
<= = >=, which need special attention to avoid confusion
with the placeholder indicators <...>.
* Fixed syntax in execute_process.rst (there were unbalanced
brackets).
* Disabled syntax highlighting for long string examples in
cmake-language.7.rst.
* No highlighting of removed syntax in CMP0049
* To inspect the outcome of this patch, see e.g. the pages
* manual/cmake-buildsystem.7.html
* module/ExternalProject.html
* module/FindPkgConfig.html
which are particularly rich in complex code snippets.
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/cmake-language.7.rst | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst index 71649ba..8740d97 100644 --- a/Help/manual/cmake-language.7.rst +++ b/Help/manual/cmake-language.7.rst @@ -206,9 +206,10 @@ enclosed content, such as `Escape Sequences`_ or `Variable References`_, is performed. A bracket argument is always given to the command invocation as exactly one argument. -For example: +.. No code-block syntax highlighting in the following example + (long string literal not supported by our cmake.py) -.. code-block:: cmake +For example:: message([=[ This is the first line in a bracket argument with bracket length 1. @@ -253,9 +254,10 @@ closing quotes. Both `Escape Sequences`_ and `Variable References`_ are evaluated. A quoted argument is always given to the command invocation as exactly one argument. -For example: +.. No code-block syntax highlighting in the following example + (escape \" not supported by our cmake.py) -:: +For example:: message("This is a quoted argument containing multiple lines. This is always one argument even though it contains a ; character. @@ -264,11 +266,12 @@ For example: It does end in an unescaped double quote. ") +.. No code-block syntax highlighting in the following example + (for conformity with the two above examples) + The final ``\`` on any line ending in an odd number of backslashes is treated as a line continuation and ignored along with the -immediately following newline character. For example: - -.. code-block:: cmake +immediately following newline character. For example:: message("\ This is the first line of a quoted argument. \ |