You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
content/mojibake should read the same rendered prose as content/placeholder-text #216
PR #214 added getRenderedProseText, which extends getProseTextExcludingCode with three exclusions that apply just as well to content/mojibake:
<template> subtrees. linkedom keeps template children in childNodes, so a plain text walk reads markup the browser never renders.
Container classes of in-page code editors and syntax highlighters (cm-editor, monaco-editor, hljs, language-* and friends). CodeMirror and Monaco emit no <pre> or <code> at all, so a tag-only exclusion reads their content as prose.
A line break at every block boundary, so adjacent blocks do not fuse into one word.
content/mojibake was left on the old helper in #214 to keep that PR's blast radius small. Switching it is a behaviour change and moves the pinned counts in streaming-rules-canonical-golden.test.ts, so it wants its own change.
Acceptance Criteria
content/mojibake does not report a sequence that appears only inside a <template> or inside a code-editor container.
A page whose mojibake is in ordinary prose is still reported exactly as before.
The pinned counts in packages/audit-engine/tests/streaming-rules-canonical-golden.test.ts are updated with a comment saying which rule moved them, or a comment records that they did not move.
content/mojibake's docs page lists the same exclusions its code applies.
Reproduced on 0.0.108 with a local fixture. It’s only inside a <template>, and only inside <div class="cm-editor">, each gives content/mojibake, check encoding-corruption, warn, 1 encoding corruption occurrence(s) in visible text (utf8-as-latin1): .... The ordinary-prose control gives the same warning, as it should.
origin/main still reads getProseTextExcludingCode(body) in packages/rules/src/content/mojibake.ts.
Activity
nc9 commentedon Oct 11, 2026
Reproduced on 0.0.108 with a local fixture.
It’sonly inside a<template>, and only inside<div class="cm-editor">, each givescontent/mojibake, checkencoding-corruption,warn,1 encoding corruption occurrence(s) in visible text (utf8-as-latin1): .... The ordinary-prose control gives the same warning, as it should.origin/main still reads
getProseTextExcludingCode(body)inpackages/rules/src/content/mojibake.ts.fix(rules): placeholder-text reads the title; mojibake reads rendered…