Skip to content

Add missing factory mappings and comprehensive parser tests#15

Merged
ReneSchwarzer merged 3 commits intocopilot/implement-reverse-html-rendererfrom
copilot/improve-reverse-html-renderer
Apr 11, 2026
Merged

Add missing factory mappings and comprehensive parser tests#15
ReneSchwarzer merged 3 commits intocopilot/implement-reverse-html-rendererfrom
copilot/improve-reverse-html-renderer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

The HTML parser factory was missing mappings for three elements present in the codebase, and test coverage needed expansion for edge cases and roundtrip fidelity.

Factory mappings

  • Added kbdHtmlElementTextSemanticsKdb (standard HTML tag; existing class uses "kdb" internally)
  • Added keygenHtmlElementFormKeygen
  • Added commandHtmlElementInteractiveCommand

Tokenizer

  • Added keygen to void elements set so <keygen> is correctly treated as self-closing

Tests (+19 new, 66 total parser tests)

  • Tokenizer: whitespace preservation, unquoted attributes, inline styles, stray < handling, keygen void element
  • Factory: kbd/keygen/command resolution
  • Parser: ParseSingle, inline styles, table structures, multiple roots, mismatched end tags, mixed content, form+input nesting, kbd tag parsing
  • Roundtrip: style attribute fidelity, anchor href+text preservation

Copilot AI changed the title [WIP] Implement reverse HTML rendering parser for WebExpress framework Add missing factory mappings and comprehensive parser tests Apr 11, 2026
Copilot AI requested a review from ReneSchwarzer April 11, 2026 19:02
@ReneSchwarzer ReneSchwarzer marked this pull request as ready for review April 11, 2026 19:47
@ReneSchwarzer ReneSchwarzer merged commit 1e86fb9 into copilot/implement-reverse-html-renderer Apr 11, 2026
@ReneSchwarzer ReneSchwarzer deleted the copilot/improve-reverse-html-renderer branch April 11, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants