mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-09-03 18:14:53 +03:00
Clean up "GDScript" extension use from conf.py.
This commit is contained in:
@@ -1578,7 +1578,10 @@ class GDScriptLexer(RegexLexer):
|
|||||||
|
|
||||||
|
|
||||||
def setup(sphinx):
|
def setup(sphinx):
|
||||||
|
from sphinx.highlighting import lexers
|
||||||
|
|
||||||
sphinx.add_lexer("gdscript", GDScriptLexer)
|
sphinx.add_lexer("gdscript", GDScriptLexer)
|
||||||
|
lexers["gdscript"] = GDScriptLexer()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"parallel_read_safe": True,
|
"parallel_read_safe": True,
|
||||||
|
|||||||
14
conf.py
14
conf.py
@@ -19,6 +19,7 @@ extensions = [
|
|||||||
"sphinxext.opengraph",
|
"sphinxext.opengraph",
|
||||||
"sphinx_copybutton",
|
"sphinx_copybutton",
|
||||||
"sphinxcontrib.video",
|
"sphinxcontrib.video",
|
||||||
|
"gdscript",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Warning when the Sphinx Tabs extension is used with unknown
|
# Warning when the Sphinx Tabs extension is used with unknown
|
||||||
@@ -44,9 +45,6 @@ ogp_social_cards = {
|
|||||||
"enable": False
|
"enable": False
|
||||||
}
|
}
|
||||||
|
|
||||||
if not os.getenv("SPHINX_NO_GDSCRIPT"):
|
|
||||||
extensions.append("gdscript")
|
|
||||||
|
|
||||||
if not os.getenv("SPHINX_NO_DESCRIPTIONS"):
|
if not os.getenv("SPHINX_NO_DESCRIPTIONS"):
|
||||||
extensions.append("godot_descriptions")
|
extensions.append("godot_descriptions")
|
||||||
|
|
||||||
@@ -119,16 +117,6 @@ print("Build language: {}, i18n tag: {}".format(language, is_i18n))
|
|||||||
|
|
||||||
exclude_patterns = [".*", "**/.*", "_build", "_tools"]
|
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
|
smartquotes = False
|
||||||
|
|
||||||
# Pygments (syntax highlighting) style to use
|
# Pygments (syntax highlighting) style to use
|
||||||
|
|||||||
Reference in New Issue
Block a user