diff options
author | Michal Čihař <michal@cihar.com> | 2013-06-05 12:27:00 +0400 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2013-06-05 12:29:37 +0400 |
commit | 8002be2ad8a9e72156d862a3a88211216fde20cc (patch) | |
tree | c576a1e066027b3814bb66754cb9617ed059a096 /doc | |
parent | e63b20e391365eb7a4b53a4ab85f57d190187469 (diff) |
Highlight PHP without starting <?php tag in docs
Diffstat (limited to 'doc')
-rw-r--r-- | doc/conf.py | 6 | ||||
-rw-r--r-- | doc/setup.rst | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/conf.py b/doc/conf.py index 53ab4fc0b8..16d6086eaf 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -284,3 +284,9 @@ epub_copyright = copyright # Allow duplicate toc entries. #epub_tocdup = True + +# Highlight PHP without starting <?php tag +from sphinx.highlighting import lexers +from pygments.lexers.web import PhpLexer + +lexers['php'] = PhpLexer(startinline=True) diff --git a/doc/setup.rst b/doc/setup.rst index 7b57cb9ec1..713b1672c0 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -56,7 +56,7 @@ okay for a particular setting, there is no need to include it in :file:`config.inc.php`. You'll need a few directives to get going, a simple configuration may look like this: -.. code-block:: php +.. code-block:: xml+php <?php @@ -69,7 +69,7 @@ simple configuration may look like this: Or, if you prefer to not be prompted every time you log in: -.. code-block:: php +.. code-block:: xml+php <?php |