From a85cd0a6f89ddf2756dba58457e8540b94860f45 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Mon, 28 Sep 2026 10:05:06 -0700 Subject: [PATCH] docs(agent-feedback): file text body and non-null assertion gaps File the parser gaps left after 5.18.0. Text-only bodies are lexed as JavaScript, so prose and CSS bodies need a mode that recognizes only placeholders and the closing tag (`It's` fails today), and `'` prints nothing (no `placeholder x`); with `''` it prints `ERR EOF reached while parsing string expression`. diff --git a/agent-feedback/items/2026-09-25-add-a-text-body-mode-that-does-not-lex-javascript.md b/agent-feedback/items/2026-09-25-add-a-text-body-mode-that-does-not-lex-javascript.md new file mode 100644 index 0000000..b661e84 --- /dev/null +++ b/agent-feedback/items/2026-09-25-add-a-text-body-mode-that-does-not-lex-javascript.md @@ -0,0 +1,12 @@ +--- +type: bug +impact: high +effort: med +site: src/states/PARSED_TEXT_CONTENT.ts › PARSED_TEXT_CONTENT +--- + +# Add a text body mode that does not lex JavaScript, for prose and CSS bodies + +`TagType.text` is the only text-only body mode, and `PARSED_TEXT_CONTENT.parse` lexes it as JavaScript: a quote enters `PARSED_STRING`, a backtick `TEMPLATE_STRING`, and `//` or `/*` enter `JS_COMMENT_LINE`/`JS_COMMENT_BLOCK`. That fits `` runs to the end of the file with "EOF reached while parsing string expression". (An escaped quote or slash has its own item, "Treat a backslash-escaped quote as text in parsed-text bodies and parsed strings".) Regex lexing cannot simply be added, because the same body mode serves `