Skip to content

Commit b55c299

Browse files
authored
Merge pull request #15112 from fossilet/upstream_main
Fix sphinx.add_lexer.
2 parents 06544e9 + 795668d commit b55c299

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/codeql/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@
4949
import os
5050
import sys
5151

52+
import sphinx as sphinx_mod
53+
54+
5255
def setup(sphinx):
5356
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
5457
from qllexer import QLLexer
55-
sphinx.add_lexer("ql", QLLexer())
58+
sphinx.add_lexer("ql", QLLexer() if sphinx_mod.version_info[0] <= 3 else QLLexer)
5659

5760
# The version of CodeQL for the current release you're documenting, acts as replacement for
5861
# |version| and |release|. Not currently used.

0 commit comments

Comments
 (0)