cloudflare / cloudflare/lol-html
Text handler is not invoked for empty content
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
I would expect that any element with empty content and a closing tag to fire the `text` handler with `text: ''` and `lastInTextNode: true`. Otherwise, I do not get a chance to append content (based on existing content). Alternatively, an endtag handler mentioned in https://github.com/cloudflare/lol-html/issues/85 would suffice, if it gives me a chance to use `endTag.before()`.
Contributor guide
Research direction
The issue names no files or tests. Start by locating the parser path for empty content and the text or end-tag handler API, then add coverage for an empty element with a closing tag. Done means the callback receives empty text with lastInTextNode true, or the end-tag hook provides the requested before() capability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100