htmlToDraft adds extra space to text node
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 163
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
console.log(html);
const contentBlock = htmlToDraft(html);
contentBlock.contentBlocks.forEach(i => console.log(i.toJS()));
first console.log prints this
<ul>
<li>sdf</li>
</ul>
console.log for contentBlock prints this
characterList: (4) [{…}, {…}, {…}, {…}]
data: {}
depth: 0
key: "8fh3d"
text: "sdf "
type: "unordered-list-item"
as you see it adds extra space to text inside <li>
Contributor guide
No contributing guide indexed for this repository
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
Start at the htmlToDraft entry point and reproduce the issue with the HTML shown in the report, comparing the source output with the generated content block. Done means text inside the list item is preserved without the trailing extra space.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100