Unnecessary new line \n character
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 325
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
Hey @jpuri !
I was trying to convert a draft to html. While doing so, I was running to an issue that each block was seperated by a \n character. This seemed to be originating from https://github.com/jpuri/draftjs-to-html/blob/c02452e3ce6719f84f38d39f8f9b0a9e32bf871f/lib/draftjs-to-html.js#L615
Is there any workaround where the new line character is not the delimiter?
Thank you
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 lib/draftjs-to-html.js around line 615 and trace how blocks are joined during draft-to-HTML conversion. Reproduce the issue with multiple blocks and verify that the output no longer includes an unwanted \n delimiter while retaining the expected HTML structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100