From b7f7e15fbc1c6ed0ef36a3f28c3e540af607de76 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Tue, 9 Jun 2026 05:18:13 +0200 Subject: [PATCH] feat(html): table tree construction with implied tbody/tr (#83) --- CHANGELOG.md | 1 + README.md | 2 +- Sources/HTML/HTMLDocumentBuilder.swift | 27 ++++++++++++++++++++++++++ Tests/HTMLDocumentTests.swift | 27 ++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ccb748..7869cb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- HTML5 table tree construction (#83, stage 1): a `` written without its section and row wrappers now nests correctly. A `` directly inside a `
` gets an implied ``, a `` (and section), consecutive rows share one implied ``, and an explicit ``/``/`` is not duplicated, all inside an open table only. - HTML tokenizer correctness (#84, partial): numeric character references are now range/surrogate-validated (zero, surrogates, and values above U+10FFFF yield U+FFFD) with the Windows-1252 C1 fixup table (`€` -> euro, etc.); named references are decoded by longest match with or without a trailing semicolon; a literal NUL byte becomes U+FFFD; RCDATA elements (`title`, `textarea`) decode character references while raw-text elements (`script`, `style`) take their content verbatim; and a single leading newline after `
`/`` gets an implied `