aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/generate.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 06:04:44 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 06:04:44 -0500
commitec3d767435390cebedee8e3ca504d4b20d52f735 (patch)
tree5a782c0f30b1630a55bc615e6b98c192f57e0cb1 /scripts/theme-studio/generate.py
parent6b85997cdf879e0e5c31c6c2ae5cb277e1d742d8 (diff)
downloaddotemacs-ec3d767435390cebedee8e3ca504d4b20d52f735.tar.gz
dotemacs-ec3d767435390cebedee8e3ca504d4b20d52f735.zip
docs(theme-studio): warn that fill_data tokens are replaced in comments too
Diffstat (limited to 'scripts/theme-studio/generate.py')
-rw-r--r--scripts/theme-studio/generate.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py
index e2a26f82..24ad7a1b 100644
--- a/scripts/theme-studio/generate.py
+++ b/scripts/theme-studio/generate.py
@@ -503,6 +503,9 @@ APP_JS</script>"""
# Fill the data placeholders. str.replace is literal (no backref interpretation),
# so backslashes in the inlined JS survive intact — the escaping-bug class that
# the triple-quoted string used to cause is gone now that app.js is a real file.
+# Caveat: these tokens are replaced everywhere they appear, including inside code
+# comments. Don't write a placeholder name (COLORMATH_J, APP_CORE_J, ...) in
+# prose in any inlined file, or that prose gets the body spliced into it too.
def fill_data(s):
return (s.replace("COLORMATH_J",COLORMATH_BODY)
.replace("APP_CORE_J",APP_CORE_BODY)