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.

Strange behavior of newlines

See original GitHub issue
>>> import mistune
>>> markdown = mistune.create_markdown()
>>> markdown('foo\n  bar')
'<p>foo\n  bar</p>\n'
>>> markdown('foo \n  bar')
'<p>foo \n  bar</p>\n'
>>> markdown('foo  \n  bar')
'<p>foo<br />\n  bar</p>\n'

I believe this is incorrect. The output should have a
between those two lines always, it shouldn’t depend on two spaces before newline.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lepturecommented, Nov 20, 2020

I’ve added hard_wrap back into the master code.

2reactions
lepturecommented, Jul 6, 2020

This can be done with a custom InlineParser right now. But I think it would be good to make an option for it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange Behaviour of Vim on New Lines - Stack Overflow
Therefore, question: is there a way to convert all new lines to 0a in vim ? Why does hex replacement not work? vim....
Read more >
Newline behavior in GitLab is weird - Issues
A newline in this comment box means nothing in the final output. One has to dig through documentation to find that one needs...
Read more >
Strange behavior after entering a newline in a cell of the dmn ...
I'm currently on a Mac and was happy to find that if I hold the 'command' key while pressing enter, the system created...
Read more >
Solved: Replacing new lines, weird behavior observed
I am observing a new line is added in the beginning after replacing a text. but when observed through nifi ui I do...
Read more >
Bug - Odd line break behavior in text with Overflow=Linked
5. Observe behavior. Expected: Line breaks in text in linked boxes behave the same as in boxes with other overflow settings.
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