mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-05-06 07:56:44 -04:00
Clean up "GDScript" extension use from conf.py.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user