Newline breaks
See original GitHub issue- Markwon version: 4.1.0
While setting text that has newline(s) via Markwon to EditText, I have found some issues atm.
- A single newline doesn’t show up.
Markwon markwon = Markwon.builder(context)
.usePlugin(CorePlugin.create())
.usePlugin(LinkifyPlugin.create())
.build();
markwon.setMarkdown(myEditText, "Test\ntest");
- newlines work and more than 2 newlines is ignored)
markwon.setMarkdown(myEditText, "Test\n\n\n\n\ntest");
If setText the strings without markwon, no issues.
It would be great to resolve the issue asap.
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
The Dos and Don'ts of Adding an HTML Line Break
In HTML, the <br> element creates a line break. You can add it wherever you want text to end on the current line...
Read more >Newline - Wikipedia
Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control...
Read more >Line break in HTML with '\n' - Stack Overflow
The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the...
Read more ><br>: The Line Break element - HTML - MDN Web Docs - Mozilla
The HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division...
Read more >EOL or End of Line or newline ascii character
It is a character in a string which represents a line break, which means that after this character, a new line will start....
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
Works like a charm @noties thanks Your library is making life easier.
@Hello @gbhaumikkumar14,
this works as expected according to the commonmark spec. There are 2 kinds of line breaks - soft and hard. A soft break is a single new line character. By default it is rendered as a space. If you wish to render a new line instead of the space - use
SoftBreakAddsNewLinePlugin
: