From 0d051f3e6abc4f15e35592d3537ac306e31ec5c7 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Fri, 28 Aug 2026 06:30:27 -0700 Subject: [PATCH] agent-feedback: file postfix-! paren stripping and html-style body formatting --- ...2026-08-28-document-html-style-body-formatting.md | 12 ++++++++++++ ...-28-keep-parens-around-postfix-bang-attr-value.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 agent-feedback/items/2026-08-28-document-html-style-body-formatting.md create mode 100644 agent-feedback/items/2026-08-28-keep-parens-around-postfix-bang-attr-value.md diff --git a/agent-feedback/items/2026-08-28-document-html-style-body-formatting.md b/agent-feedback/items/2026-08-28-document-html-style-body-formatting.md new file mode 100644 index 0000000..8533f74 --- /dev/null +++ b/agent-feedback/items/2026-08-28-document-html-style-body-formatting.md @@ -0,0 +1,12 @@ +--- +type: unclear +impact: low +effort: low +site: README.md › # Options +--- + +# Say in the README that ``/`` bodies are formatted and that `embeddedLanguageFormatting: "off"` is the only (global) way to keep them as written + +`getTagParser` in `src/utils/get-parser-name.ts` returns `"css"` for `html-style` with no `type=` test, and `getScriptTagParser` returns `babel-ts`/`json` for `html-script` unless its `type=` falls outside module/text/javascript/application/javascript/importmap/speculationrules/application/json, so both bodies are reprinted by prettier's embedded printers. Marko writes those bodies out verbatim (`packages/runtime-tags/src/translator/core/html-style.ts` parses them with `text: true, preserveWhitespace: true`), so a `--write` changes the rendered bytes of every page that uses the tags, and a project holding a "formatting must not change the rendered output" gate has to read the plugin's source to learn that this is intended. It is intended: `src/__tests__/fixtures/html-style-element` and `src/__tests__/fixtures/script-with-type` pin it, and `getCompiledText` in `src/__tests__/index.test.ts` skips `script`, `html-script`, `style` and `html-style` before asserting the compiled text is unchanged. README.md's only option section is `markoSyntax` and never mentions any of it. Add a paragraph under `# Options` naming the tag bodies that get reformatted, saying that Prettier's `embeddedLanguageFormatting: "off"` is the only lever and that it is global (prettier 3.9.6 returns from `printEmbeddedLanguages` before running `embed` whenever the option is not `"auto"`, so it also stops formatting `