Odd emu-format behaviour with <dt> in table
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 245
- Forks
- 80
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 2
Description
Test case:
<emu-table id="table-foo">
<table class="real-table">
<thead>
<tr>
<th>Foo</th>
</tr>
</thead>
<tr>
<dt>Bar</dt> <!---------- note the accidental substitution of dt for td -->
</tr>
</table>
</emu-table>
emu-format makes this into
<!DOCTYPE html>
<emu-table id="table-foo">
<dt>Bar</dt> <!----------------- note the insertion of this extra dt element -->
<table class="real-table">
<thead>
<tr>
<th>Foo</th>
</tr>
</thead>
<tr>
<dt>Bar</dt>
</tr>
</table>
</emu-table>
Of course, garbage in, garbage out, but this might be a symptom of a correct table getting mangled in some circumstances. Feel free to close if not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided HTML input with emu-format and inspect the formatter/parser path that handles the malformed dt element inside the table. The fix is complete when formatting no longer inserts an extra dt element or moves it unexpectedly, while the reported malformed input behavior remains covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100