diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-09 06:04:44 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-09 06:04:44 -0500 |
| commit | 3033a8381d56f42c10874a0822e971966801e192 (patch) | |
| tree | d4d6e345e990e6c16d512124499e8071a126d6c4 | |
| parent | a2ab0d26019c397c1e18b1b218bbb752244d00c6 (diff) | |
| download | dotemacs-3033a8381d56f42c10874a0822e971966801e192.tar.gz dotemacs-3033a8381d56f42c10874a0822e971966801e192.zip | |
docs(theme-studio): warn that fill_data tokens are replaced in comments too
| -rw-r--r-- | scripts/theme-studio/generate.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py index e2a26f825..24ad7a1b7 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) |
