Fix docs syntax highlighting errors (#50836)

* Add support for [WARNING]: ...

* Fix unreachable/failed output lexing.

* Detecting retry/--limit lines.

* Removing strange (invisible) characters which cause lexing problems.

* Using better-fitting lexers.

* Improve YAML lexing: don't accept quotes in keys.

* Add Django lexer (unchanged) from Pygments.

* Add support for != and % operators.
This commit is contained in:
Felix Fontein 2019-01-24 23:09:41 +01:00 committed by Alicia Cozine
commit f6122fb63b
9 changed files with 164 additions and 35 deletions

View file

@ -100,7 +100,7 @@ of tasks running concurrently, you can do it this way::
- 5
durations: "{{ item }}"
include_tasks: execute_batch.yml
loop: "{{ sleep_durations | batch(2) | list }}"
loop: "{{ sleep_durations | batch(2) | list }}"
#####################
# execute_batch.yml

View file

@ -904,7 +904,9 @@ style. For example the following::
{{ "Plain style (default)" | comment }}
will produce this output::
will produce this output:
.. code-block:: text
#
# Plain style (default)
@ -923,7 +925,9 @@ above, you can customize it with::
{{ "My Special Case" | comment(decoration="! ") }}
producing::
producing:
.. code-block:: text
!
! My Special Case
@ -935,7 +939,7 @@ It is also possible to fully customize the comment style::
That will create the following output:
.. code-block:: sh
.. code-block:: text
#######
#
@ -1040,7 +1044,7 @@ To search a string with a regex, use the "regex_search" filter::
{{ 'ansible' | regex_search('(foobar)') }}
# case insensitive search in multiline mode
{{ 'foo\nBAR' | regex_search("^bar", multiline=True, ignorecase=True) }}
{{ 'foo\nBAR' | regex_search("^bar", multiline=True, ignorecase=True) }}
To search for all occurrences of regex matches, use the "regex_findall" filter::