Skip to content

Commit

Permalink
minor #4287 support Varnish in configuration blocks (xabbuh)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wouterj committed Oct 11, 2014
2 parents 1603463 + f2bf980 commit 090afab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _exts
11 changes: 11 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# adding PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer
from pygments.lexers.agile import RubyLexer

# -- General configuration -----------------------------------------------------

Expand Down Expand Up @@ -100,6 +101,15 @@
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)
lexers['php-symfony'] = PhpLexer(startinline=True)
lexers['varnish2'] = RubyLexer()
lexers['varnish3'] = RubyLexer()
lexers['varnish4'] = RubyLexer()

config_block = {
'varnish2': 'Varnish 2',
'varnish3': 'Varnish 3',
'varnish4': 'Varnish 4'
}

# use PHP as the primary domain
primary_domain = 'php'
Expand Down Expand Up @@ -264,3 +274,4 @@

# Use PHP syntax highlighting in code examples by default
highlight_language='php'

0 comments on commit 090afab

Please sign in to comment.