From e89b4a5de58ea9e517912b47a65d75aedac289cd Mon Sep 17 00:00:00 2001 From: Jonathan Plasse <13716151+JonathanPlasse@users.noreply.github.com> Date: Thu, 2 Feb 2023 19:59:22 +0100 Subject: [PATCH] Fix hardcoded url in transform_readme.py (#2487) --- scripts/transform_readme.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/transform_readme.py b/scripts/transform_readme.py index 48c041120d..d2afcdf1bf 100644 --- a/scripts/transform_readme.py +++ b/scripts/transform_readme.py @@ -7,32 +7,36 @@ adjusts the images in the README.md to support the given target. import argparse from pathlib import Path +URL = "https://user-images.githubusercontent.com/1309177/{}.svg" +URL_LIGHT = URL.format("212613257-5f4bca12-6d6b-4c79-9bac-51a4c6d08928") +URL_DARK = URL.format("212613422-7faaf278-706b-4294-ad92-236ffcab3430") + # https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to -GITHUB = """ +GITHUB = f"""

- - - Shows a bar chart with benchmark results. + + + Shows a bar chart with benchmark results.

""" # https://github.com/pypi/warehouse/issues/11251 -PYPI = """ +PYPI = f"""

- Shows a bar chart with benchmark results. + Shows a bar chart with benchmark results.

""" # https://squidfunk.github.io/mkdocs-material/reference/images/#light-and-dark-mode -MK_DOCS = """ +MK_DOCS = f"""

- Shows a bar chart with benchmark results. + Shows a bar chart with benchmark results.

- Shows a bar chart with benchmark results. + Shows a bar chart with benchmark results.

"""