xref: /Universal-ctags/docs/_ext/lexers.py (revision 955bf304abce8c146a2b7ffc6fa28a4727283b5e)
1from ctags_optlib_highlighter import CtagsOptlibLexer
2import sphinx
3
4def setup(app):
5    v = sphinx.__version__.split('.')
6    if int(v[0]) > 3:
7        c = CtagsOptlibLexer
8    elif (int(v[0]) == 3) and (int(v[1]) > 3):
9        c = CtagsOptlibLexer
10    else:
11        c = CtagsOptlibLexer()
12    app.add_lexer('ctags', c)
13