Fix HTML attribute parsing: strip \" delimiters from JSON-extracted HTML

Tests with _=\"...\" attribute delimiters were garbled because
HTMLParser interpreted the backslash-quote as content, not delimiters.
Now html.replace('\"', '"') normalizes before parsing.

Fixes ~15 tests across toggle, transition, and other categories
that were previously running with corrupted HS source.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-18 21:06:09 +00:00
parent 5a0740d3ce
commit 06bed36272
2 changed files with 82 additions and 87 deletions

View File

@@ -98,6 +98,9 @@ def parse_html(html):
# Remove | separators
html = html.replace(' | ', '')
# Fix escaped attribute delimiters from JSON extraction (\" → ")
html = html.replace('\\"', '"')
elements = []
stack = []