text\ntext not parsed correctly
See original GitHub issueHello, thank you for this amazing library! I really love it!
While I was using it, I found a small bug where the \n character is not rendered correctly. When I did Markwon.setMarkdown(textView, "haha\ngaga");
, the outcome looks like this:
Where I would expect there’s a newline between “haha” and “gaga”. Could anyone show me how to fix this? Greatly appreciated!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Full Text not parsing a specific term correctly - Microsoft Q&A
Full Text not parsing a specific term correctly. Adding the term "RON 1376" or RON in uppercase followed by a numeric value will...
Read more >Text could not be parsed, unparsed text found - Stack Overflow
The first time passes perfectly but anyone after that causes the error. They both have the exact same format with no whitespace on...
Read more >Jsdoc https @link text not parsed properly #46734 - GitHub
Using TypeScript v4.3.5 , everything works fine. I do not understand why the JSDoc implementation on VSCode is dependent of TypeScript version ...
Read more >Newline \n not parsing correctly - TextMesh Pro - Unity Forum
A simple hand typed \n into the public string variable test 2. Under both conditions a breakpoint showed \\n as the character and...
Read more >IO tools (text, CSV, HDF5, …) — pandas 1.5.2 documentation
Some formats which encode all characters as multiple bytes, like UTF-16, won't parse correctly at all without specifying the encoding.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @DSofter !
Thank you for your feedback! About the
new line
- yeah, it’s not that it’s parsed incorrectly. The thing is one new line (\n
) character in markdown (according to the spec) is considered asoft line break
. Currently Markwon does not provide a way to configure it (treat a soft line break as a hard one). But now I’m planning to add it to the next release. Meanwhile you can follow the generic advice from here (#20) and overridevisit(SoftLineBreak softLineBreak)
to insert a\n
character instead.Also, you could try
haha\n\ngaga
and it will be rendered like you expect (double new line characters)🙌
@noties I tried. Works like a charm!