From ca4e86d07ed64fbf3482613b2f794ad5154e00ee Mon Sep 17 00:00:00 2001 From: gilesb Date: Sat, 7 Feb 2026 01:02:08 +0000 Subject: [PATCH] Fix S-expression syntax highlighting - HTML was leaking into displayed text Cascading regex replacements corrupted their own output: the string regex matched CSS class names inside previously-generated span tags. Replaced with a single-pass character tokenizer that never re-processes its own HTML output. Also added highlighting to recipe detail page (previously had none). Co-Authored-By: Claude Opus 4.6 --- app/templates/recipes/detail.html | 76 ++++++++++++++++++++++++- app/templates/runs/detail.html | 94 +++++++++++++++++++++++++------ 2 files changed, 153 insertions(+), 17 deletions(-) diff --git a/app/templates/recipes/detail.html b/app/templates/recipes/detail.html index 3c6843a..daf134a 100644 --- a/app/templates/recipes/detail.html +++ b/app/templates/recipes/detail.html @@ -116,12 +116,86 @@

Recipe (S-expression)

{% if recipe.sexp %} -
{{ recipe.sexp }}
+
{{ recipe.sexp }}
{% else %}

No source available

{% endif %}
+ +