mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 08:51:14 -03:00
Stop depending on fish_indent for man pages
This allows building man pages without having `fish_indent` available, which is useful because building man pages can happen during compilation of the fish binaries, including `fish_indent`, resulting in an annoying cyclic dependency. This change does not affect the generated man pages, at least with the current config.
This commit is contained in:
committed by
Johannes Altmanninger
parent
e895f96f8a
commit
32e5fa0c03
@@ -10,6 +10,7 @@ import glob
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
from sphinx.highlighting import lexers
|
||||
from sphinx.errors import SphinxWarning
|
||||
from docutils import nodes
|
||||
|
||||
@@ -35,11 +36,14 @@ def issue_role(name, rawtext, text, lineno, inliner, options=None, content=None)
|
||||
return [link], []
|
||||
|
||||
|
||||
def do_not_use_fish_indent_for_man(app):
|
||||
if app.builder.name == "man":
|
||||
del lexers["fish-docs-samples"]
|
||||
|
||||
|
||||
# -- Load our extensions -------------------------------------------------
|
||||
def setup(app):
|
||||
# Our own pygments lexers
|
||||
from sphinx.highlighting import lexers
|
||||
|
||||
this_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
sys.path.insert(0, this_dir)
|
||||
from fish_indent_lexer import FishIndentLexer
|
||||
@@ -52,6 +56,8 @@ def setup(app):
|
||||
app.add_config_value("issue_url", default=None, rebuild="html")
|
||||
app.add_role("issue", issue_role)
|
||||
|
||||
app.connect("builder-inited", do_not_use_fish_indent_for_man)
|
||||
|
||||
|
||||
# The default language to assume
|
||||
highlight_language = "fish-docs-samples"
|
||||
|
||||
Reference in New Issue
Block a user