mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
fixup! Add documentation for Google
This commit is contained in:
parent
25d6369b04
commit
de7e55688f
1 changed files with 16 additions and 0 deletions
16
certbot-dns-google/docs/_ext/jsonlexer.py
Normal file
16
certbot-dns-google/docs/_ext/jsonlexer.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""Copied from https://stackoverflow.com/a/16863232"""
|
||||
|
||||
def setup(app):
|
||||
# enable Pygments json lexer
|
||||
try:
|
||||
import pygments
|
||||
if pygments.__version__ >= '1.5':
|
||||
# use JSON lexer included in recent versions of Pygments
|
||||
from pygments.lexers import JsonLexer
|
||||
else:
|
||||
# use JSON lexer from pygments-json if installed
|
||||
from pygson.json_lexer import JSONLexer as JsonLexer
|
||||
except ImportError:
|
||||
pass # not fatal if we have old (or no) Pygments and no pygments-json
|
||||
else:
|
||||
app.add_lexer('json', JsonLexer())
|
||||
Loading…
Reference in a new issue