From 95094c381e193a057017f3073a905a298c66b106 Mon Sep 17 00:00:00 2001 From: Zeglius <33781398+Zeglius@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:53:20 +0200 Subject: [PATCH] chore(docs): fix cmdrun breaking image url replacement (#1600) * chore(docs): fix cmdrun breaking image url replacement * ci(docs): Trigger deploy_docs with any change in docs dir --- .github/workflows/deploy_docs.yml | 5 +---- docs/hooks/cmdrun.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 96937da5..c4e46f99 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -10,10 +10,7 @@ on: branches: - main paths: - - docs/**/*.md - - docs/**/*.png - - docs/**/*.jpg - - docs/**/*.jpeg + - docs/** - .github/workflows/deploy_docs.yml - README*.md workflow_dispatch: diff --git a/docs/hooks/cmdrun.py b/docs/hooks/cmdrun.py index c9eeda74..77352a38 100644 --- a/docs/hooks/cmdrun.py +++ b/docs/hooks/cmdrun.py @@ -179,7 +179,7 @@ def _on_page_markdown_replace_urls( for src, dst in URL_MAPPINGS: if config.site_url: dst = f"{config.site_url.rstrip("/")}/{dst.lstrip("/")}" - res = re.sub(rf"\b{re.escape(src)}\b", dst, res) + res = re.sub(rf"\b{re.escape(src)}\b", dst, res, flags=re.UNICODE) return res