|
@@ -42,8 +42,6 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
|
|
-pygments_style = 'sphinx'
|
|
|
-
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
# a list of builtin themes.
|
|
|
#
|
|
@@ -63,3 +61,14 @@ def setup(app):
|
|
|
'enable_eval_rst': True,
|
|
|
}, True)
|
|
|
app.add_transform(AutoStructify)
|
|
|
+
|
|
|
+# Syntax highlighting
|
|
|
+pygments_style = 'sphinx'
|
|
|
+
|
|
|
+# adding PhpLexer
|
|
|
+from sphinx.highlighting import lexers
|
|
|
+from pygments.lexers.web import PhpLexer
|
|
|
+
|
|
|
+# enable highlighting for PHP code not between ``<?php ... ?>`` by default
|
|
|
+lexers['php'] = PhpLexer(startinline=True)
|
|
|
+lexers['php-annotations'] = PhpLexer(startinline=True)
|