From f13ca392c67ee957efdf64f178c5ca05f5f6d8c7 Mon Sep 17 00:00:00 2001 From: Erik Sjölund Date: Sun, 6 Mar 2022 21:40:39 +0100 Subject: [CI:DOCS] Remove "(1)" from web tab text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove the ending text "(1)" to avoid it from being displayed in the web tab title for a command man page on the web. Often such a text indicates that a web page got an update. For instance GitHub issues shows the number of new comments that have been written after the user's last visit. Fixes #13438 Signed-off-by: Erik Sjölund --- docs/source/conf.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/source/conf.py b/docs/source/conf.py index 7684dd3f7..505bcbec7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -72,8 +72,13 @@ def convert_markdown_title(app, docname, source): docpath = app.env.doc2path(docname) if docpath.endswith(".md"): # Convert pandoc title line into eval_rst block for myst_parser - source[0] = re.sub(r"^% (.*)", r"```{title} \g<1>\n```", source[0]) - + # + # Remove the ending "(1)" to avoid it from being displayed + # in the web tab. Often such a text indicates that + # a web page got an update. For instance GitHub issues + # shows the number of new comments that have been written + # after the user's last visit. + source[0] = re.sub(r"^% (.*)(\(\d\))", r"```{title} \g<1>\n```", source[0]) def setup(app): app.connect("source-read", convert_markdown_title) -- cgit v1.2.3-54-g00ecf