Closed tryboxx closed 10 months ago
Hello, @tryboxx Can you provide a code snippet to reproduce this error? Make sure the content keeps the markdown standards.
Multiple
Lines
Is rendered like:
MultipleLines
I've seen this behaviour happening on some Markdown editors already, and I remember it annoyed me. But at least GitHub and Confluence/Jira provide a WYSIWYG experience for this.
Sure @jeziellago, thats my implementation of the string from the screenshot:
"• low porosity hair\n• medium porosity hair\n• high porosity hair"
MarkdownText(
markdown = highlightedSection.content,
color = Color.Black,
style = AppTheme.typography.normalText2
)
Keep in mind that Markdown ignores single line break on purpose.
I'm not sure what would be the best solution for this case.
Maybe replacing \n
with \n\n
if you are sure that the content wasn't originally written with Markdown in mind.
You're right, but that's why I reported this issue - in my opinion, every markdown library should handle this case with some workaround, like Swift libraries do. It can be handled on library side, by default.
Usually when I want to go insert a new line, but markdown refuses to comply, I just use <br />
.
It doesn't leave the huge gap that double new lines leave.
(dunno if this library supports the <br />
tag, I just posted my general solution to this problem)
@jeziellago maybe add this plugin?
.usePlugin(SoftBreakAddsNewLinePlugin.create())
The
\n
mark in string is ignored when usingMarkdownText
- it appears as an empty space between the words.