chiark / gitweb /
doxygen: make it possible to highlight Jinja templates.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 9 Apr 2018 10:04:37 +0000 (12:04 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 9 Apr 2018 10:04:37 +0000 (12:04 +0200)
There's no well-known extension for these and Doxygen \code{.ext}
*requires* an extension inside {} otherwise it blows up.

doc/doxygen.rst
doxygen/dox2html5.py

index e88900c63f09e8f988110935ac5934f59587ef61..5f3962bcd81a88ae63210be1d8c77645c50ef8cf 100644 (file)
@@ -561,6 +561,12 @@ Filename suffix     Detected language
 ``.ansi``           `Colored terminal output <{filename}/css/components.rst#colored-terminal-output>`_.
                     Use ``.shell-session`` pseudo-extension for simple
                     uncolored terminal output.
+``.xml-jinja``      Jinja templates in XML markup (these don't have any
+                    well-known extension otherwise)
+``.html-jinja``     Jinja templates in HTML markup (these don't have any
+                    well-known extension otherwise)
+``.jinja``          Jinja templates (these don't have any
+                    well-known extension otherwise)
 =================== ===========================================================
 
 The theme has experimental support for inline code highlighting. Inline code is
index aafe43fe32c8cd4e4c52e1e9fdbc80f323973dd5..e828764f66987c249ab9add8e2509997698581ba 100755 (executable)
@@ -1070,6 +1070,9 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
                        # Pygments knows only .vert, .frag, .geo
                        ('.glsl', 'glsl'),
                        ('.conf', 'ini'),
+                       ('.xml-jinja', 'xml+jinja'),
+                       ('.html-jinja', 'html+jinja'),
+                       ('.jinja', 'jinja'),
                        ('.ansi', ansilexer.AnsiLexer)]
             for key, v in mapping:
                 if not filename.endswith(key): continue