mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-19 17:46:36 +03:00
The em-dash-overuse text analyzer ran stripHtmlToText over raw markup, which drops tags but leaves character entities intact. A model that wrote —, —, or — rendered a real em-dash the counter never saw, so 12 entity-escaped dashes on a live page slipped through. Decode the em-dash entities (named, zero-padded decimal, upper/lower hex) to the literal glyph before counting. En-dash entities stay untouched: the rule counts em-dashes, and the literal en-dash was never counted either. The gap lived only in the regex / static-HTML path (detectText and detect-html's runTextContentAnalyzers, both over raw HTML). The browser adapter never ran this analyzer, so build:browser and build:extension produce no diff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
18 lines
410 B
HTML
18 lines
410 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Em-dash entity overuse</title>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>A page whose em-dashes hide inside HTML entities</h1>
|
|
<p>
|
|
The product is fast — it is also cheap — and it is honest
|
|
— which matters — more than speed — or price
|
|
— in the long run.
|
|
</p>
|
|
</main>
|
|
</body>
|
|
</html>
|