Compare commits

...

3 Commits

Author SHA1 Message Date
Michael B. Gale
e6b42754d4 Fix QLLexer() call for ql-training as well 2022-11-22 11:30:24 +00:00
Michael B. Gale
289e113769 Use fallback suggested by @adityasharad
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2022-11-22 11:28:42 +00:00
Michael B. Gale
4732fed297 Fix QLLexer instance as argument to add_lexer
`add_lexer` requires a type as argument in recent versions of sphinx
See https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_lexer
2022-11-21 16:19:11 +00:00
2 changed files with 11 additions and 11 deletions

View File

@@ -2,13 +2,13 @@
#
# The Sphinx config values used in the CodeQL documentation that is published
# at codeql.github.com/docs
#
#
# Note that not all possible configuration values are present in this file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
#
# For details of all possible config values,
# For details of all possible config values,
# see https://www.sphinx-doc.org/en/master/usage/configuration.html
#
# -- GENERAL CONFIG VALUES ------------------------------------------------
@@ -50,9 +50,9 @@ import os
import sys
def setup(sphinx):
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from qllexer import QLLexer
sphinx.add_lexer("ql", QLLexer())
sphinx.add_lexer("ql", QLLexer() if callable(QLLexer) else QLLexer)
# The version of CodeQL for the current release you're documenting, acts as replacement for
# |version| and |release|. Not currently used except in LGTM Enterprise support info.
@@ -83,7 +83,7 @@ html_theme = 'alabaster'
# HTML theme options used to customize the look and feel of the docs.
html_theme_options = {'font_size': '16px',
'body_text': '#333',
'body_text': '#333',
'link': '#2F1695',
'link_hover': '#2F1695',
'show_powered_by': False,

View File

@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
# For details of all possible config values,
# For details of all possible config values,
# see https://www.sphinx-doc.org/en/master/usage/configuration.html
##################################################################################
@@ -49,10 +49,10 @@ import os
def setup(sphinx):
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.path.pardir))
from qllexer import QLLexer
sphinx.add_lexer("ql", QLLexer())
sphinx.add_lexer("ql", QLLexer() if callable(QLLexer) else QLLexer)
# Set QL as the default language for highlighting code. Set to none to disable
# syntax highlighting. If omitted or left blank, it defaults to Python 3.
# Set QL as the default language for highlighting code. Set to none to disable
# syntax highlighting. If omitted or left blank, it defaults to Python 3.
highlight_language = 'ql'
# The master toctree document.
@@ -110,7 +110,7 @@ html_show_sphinx = False
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {'font_size': '16px',
'body_text': '#333',
'body_text': '#333',
'link': '#2F1695',
'link_hover': '#2F1695',
'font_family': 'Lato, sans-serif',
@@ -122,4 +122,4 @@ html_theme_options = {'font_size': '16px',
# Exclude the slide snippets from the build
exclude_patterns = ['slide-snippets']
##############################################################################
##############################################################################