Clean up "GDScript" extension use from conf.py.

This commit is contained in:
Lukas Tenbrink
2026-01-19 14:40:41 +01:00
parent 40bb648ad1
commit eefe7ed7f3
2 changed files with 4 additions and 13 deletions
+3
View File
@@ -1578,7 +1578,10 @@ class GDScriptLexer(RegexLexer):
def setup(sphinx):
from sphinx.highlighting import lexers
sphinx.add_lexer("gdscript", GDScriptLexer)
lexers["gdscript"] = GDScriptLexer()
return {
"parallel_read_safe": True,
+1 -13
View File
@@ -19,6 +19,7 @@ extensions = [
"sphinxext.opengraph",
"sphinx_copybutton",
"sphinxcontrib.video",
"gdscript",
]
# Warning when the Sphinx Tabs extension is used with unknown
@@ -44,9 +45,6 @@ ogp_social_cards = {
"enable": False
}
if not os.getenv("SPHINX_NO_GDSCRIPT"):
extensions.append("gdscript")
if not os.getenv("SPHINX_NO_DESCRIPTIONS"):
extensions.append("godot_descriptions")
@@ -119,16 +117,6 @@ print("Build language: {}, i18n tag: {}".format(language, is_i18n))
exclude_patterns = [".*", "**/.*", "_build", "_tools"]
# fmt: off
# These imports should *not* be moved to the start of the file,
# they depend on the sys.path.append call registering "_extensions".
# GDScript syntax highlighting
from gdscript import GDScriptLexer
from sphinx.highlighting import lexers
lexers["gdscript"] = GDScriptLexer()
# fmt: on
smartquotes = False
# Pygments (syntax highlighting) style to use