Skip to content

feat: add body signals, empty for handling, and self-closing element support#42

Merged
mohamedmansour merged 1 commit intomainfrom
mmansour/parser-p1-features
Feb 23, 2026
Merged

feat: add body signals, empty for handling, and self-closing element support#42
mohamedmansour merged 1 commit intomainfrom
mmansour/parser-p1-features

Conversation

@mohamedmansour
Copy link
Copy Markdown
Contributor

@mohamedmansour mohamedmansour commented Feb 23, 2026

Parser:

  • Inject body_start/body_end raw signals around content
  • Skip empty bodies entirely (no fragment generated)
  • Handle void elements by checking parser end_tag presence
  • Handle self-closing tags (/> syntax) for SVG and other elements

Docs:

  • Remove protocol output sections from user-facing docs (signals, attributes, for, if) — show only template/state/output
  • Add body signals and empty for docs
  • Add copilot instruction: user docs must not expose protocol internals

@mohamedmansour mohamedmansour force-pushed the mmansour/parser-p1-features branch from 9088f86 to 28325eb Compare February 23, 2026 15:54
@mohamedmansour mohamedmansour changed the title Add body signals, empty for handling, and self-closing element support feat: add body signals, empty for handling, and self-closing element support Feb 23, 2026
@mohamedmansour mohamedmansour force-pushed the mmansour/attribute-fragments branch from ef7914b to 8b0ed35 Compare February 23, 2026 17:30
Base automatically changed from mmansour/attribute-fragments to main February 23, 2026 17:35
@mohamedmansour mohamedmansour force-pushed the mmansour/parser-p1-features branch from 28325eb to 92fc2ae Compare February 23, 2026 17:38
Parser:
- Inject body_start/body_end raw signals around <body> content
- Skip empty <for> bodies entirely (no fragment generated)
- Handle void elements by checking parser end_tag presence
- Handle self-closing tags (/>  syntax) for SVG and other elements

Docs:
- Remove protocol output sections from user-facing docs (signals,
  attributes, for, if) — show only template/state/output
- Add body signals and empty for docs
- Add copilot instruction: user docs must not expose protocol internals

15 new tests ported from Node generator.test.js (53 total).
@mohamedmansour mohamedmansour force-pushed the mmansour/parser-p1-features branch from 92fc2ae to b70f4b8 Compare February 23, 2026 17:39
@mohamedmansour mohamedmansour self-assigned this Feb 23, 2026
@mohamedmansour mohamedmansour requested a review from a team February 23, 2026 17:40
@mohamedmansour mohamedmansour merged commit a0e7698 into main Feb 23, 2026
5 checks passed
@mohamedmansour mohamedmansour deleted the mmansour/parser-p1-features branch February 23, 2026 17:49
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