Skip to content

Commit b44a26e

Browse files
committed
update conf.py for php highlighting
1 parent a0fb853 commit b44a26e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def has(self, *args):
8282
'pgp-fingerprint': '9DA31620334BD75D9DCB49F368818C72E52529D4'
8383
}
8484

85-
pygments_style = 'sphinx'
8685

8786
extlinks = {
8887
'hardlink' : ( 'http://docs.mongodb.com/{0}/%s'.format(conf.git.branches.current), ''),
@@ -182,6 +181,12 @@ def has(self, *args):
182181

183182
html_sidebars = sconf.sidebars
184183

184+
# Set up PHP syntax highlights
185+
from sphinx.highlighting import lexers
186+
from pygments.lexers.web import PhpLexer
187+
lexers["php"] = PhpLexer(startinline=True)
188+
lexers["php-annotations"] = PhpLexer(startinline=True)
189+
185190
# -- Options for LaTeX output --------------------------------------------------
186191

187192
latex_documents = []

0 commit comments

Comments
 (0)