Skip to content

Commit 090afab

Browse files
committed
minor #4287 support Varnish in configuration blocks (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- support Varnish in configuration blocks To be able to use them, fabpot/sphinx-php#20 has to be merged first. After that, the submodule reference has to be updated as well with this pull request. @dbu @thierrymarianne Is Ruby the language to choose to get proper syntax highlighting? Commits ------- f2bf980 support Varnish in configuration blocks
2 parents 1603463 + f2bf980 commit 090afab

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

conf.py

+11
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# adding PhpLexer
2424
from sphinx.highlighting import lexers
2525
from pygments.lexers.web import PhpLexer
26+
from pygments.lexers.agile import RubyLexer
2627

2728
# -- General configuration -----------------------------------------------------
2829

@@ -100,6 +101,15 @@
100101
lexers['php-annotations'] = PhpLexer(startinline=True)
101102
lexers['php-standalone'] = PhpLexer(startinline=True)
102103
lexers['php-symfony'] = PhpLexer(startinline=True)
104+
lexers['varnish2'] = RubyLexer()
105+
lexers['varnish3'] = RubyLexer()
106+
lexers['varnish4'] = RubyLexer()
107+
108+
config_block = {
109+
'varnish2': 'Varnish 2',
110+
'varnish3': 'Varnish 3',
111+
'varnish4': 'Varnish 4'
112+
}
103113

104114
# use PHP as the primary domain
105115
primary_domain = 'php'
@@ -264,3 +274,4 @@
264274

265275
# Use PHP syntax highlighting in code examples by default
266276
highlight_language='php'
277+

0 commit comments

Comments
 (0)