mirror of https://github.com/zulip/zulip.git
docs: Remove build warning.
Temporary workaround to remove multiple "UserWarning: Container node skipped: type=document" caused by upstream bug readthedocs/recommonmark#177. Addresses #13263.
This commit is contained in:
parent
68e93d2435
commit
1596da9450
12
docs/conf.py
12
docs/conf.py
|
@ -34,7 +34,6 @@ from version import ZULIP_VERSION
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'recommonmark',
|
|
||||||
] # type: List[str]
|
] # type: List[str]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -302,14 +301,23 @@ from recommonmark.transform import AutoStructify
|
||||||
|
|
||||||
# The suffix(es) of source filenames. You can specify multiple suffix
|
# The suffix(es) of source filenames. You can specify multiple suffix
|
||||||
# as a dictionary mapping file extensions to file types
|
# as a dictionary mapping file extensions to file types
|
||||||
# https://www.sphinx-doc.org/en/master/usage/markdown.html:
|
# https://www.sphinx-doc.org/en/master/usage/markdown.html
|
||||||
source_suffix = {
|
source_suffix = {
|
||||||
'.rst': 'restructuredtext',
|
'.rst': 'restructuredtext',
|
||||||
'.md': 'markdown',
|
'.md': 'markdown',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Temporary workaround to remove multiple build warnings caused by upstream bug.
|
||||||
|
# See https://github.com/zulip/zulip/issues/13263 for details.
|
||||||
|
from recommonmark.parser import CommonMarkParser
|
||||||
|
|
||||||
|
class CustomCommonMarkParser(CommonMarkParser):
|
||||||
|
def visit_document(self, node):
|
||||||
|
pass
|
||||||
|
|
||||||
def setup(app: Any) -> None:
|
def setup(app: Any) -> None:
|
||||||
|
|
||||||
|
app.add_source_parser(CustomCommonMarkParser)
|
||||||
app.add_config_value('recommonmark_config', {
|
app.add_config_value('recommonmark_config', {
|
||||||
'enable_eval_rst': True,
|
'enable_eval_rst': True,
|
||||||
# Turn off recommonmark features we aren't using.
|
# Turn off recommonmark features we aren't using.
|
||||||
|
|
Loading…
Reference in New Issue