question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

convertFromHTML is processing newlines in lists wrong

See original GitHub issue

When having a <ol> and in that a <li> that has newlines in form of a <br> in it, convertFromHTML will make every line in that <li> it’s own list item, that appears in the surrounding list, which is not the expected result.

Example:

<ol>
  <li>first</li>
  <li> second<br>
with<br>
newlines</li>
</ol>

will be converted to a list with the structure:

1. first
2. second
3. with
4. newlines

Every line of the second item is a ContentBlock with type ‘ordered-list-item’

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
benbriggscommented, Mar 13, 2017

#42 landed in 1.4.3

1reaction
benbriggscommented, Feb 21, 2017

@khrykin #42 should fix that, nice catch!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compose output missing new lines - Power Platform Community
I am working on a flow that emails a few fields from a SP list item as a text file. The problem is,...
Read more >
draft.js: how to preserve paragraph breaks when pasting ...
Pasting such text into TInyMCE, Quil, CKEditor, etc. all preserve both inline formatting and paragraphs. Pasting into draft.js removes the line breaks, so...
Read more >
in2csv — csvkit 1.0.7 documentation
Description¶. Converts various tabular data formats into CSV. Converting fixed width requires that you provide a schema file with the “-s” option.
Read more >
Regex assignment #2 - Digital humanities
The regex escape code that matches a new line is \n , so you want to ... consecutive new line characters), you can...
Read more >
draft-js/CHANGELOG.md
20, * Preserve list indentation when copying and pasting from one Draft.js ... 143, * Fix bug where starting new line incorrectly toggled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found