You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the HTML plugin when rendering mutliple paragraphs the las one has additional bottom margin. I'd expect to have all paragraphs have same margins.
class MarkwonActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val markwon = Markwon.builder(this)
.usePlugin(HtmlPlugin.create())
.build()
val html = """
<p>First paragraph</p>
<p>Second paragraph</p>
""".trimIndent()
setContentView(LinearLayout(this).apply {
orientation = LinearLayout.VERTICAL
addView(TextView(this@MarkwonActivity).apply {
text = markwon.toMarkdown(html)
setTextColor(Color.BLACK)
setBackgroundColor(Color.RED)
})
})
}
}
Given this sample I get the following results:
If I change the HTML to
val html = """
<p>First paragraph</p>
<b>Second paragraph</b>
""".trimIndent()
Then it looks like I wanted it to
I wouldn't mind this behavior but if add more spacing between paragraphs (via the LastLineSpacingSpan) I'll end up with doubled bottom spacing for the last paragraph.
The text was updated successfully, but these errors were encountered:
Using the HTML plugin when rendering mutliple paragraphs the las one has additional bottom margin. I'd expect to have all paragraphs have same margins.
Given this sample I get the following results:
If I change the HTML to
Then it looks like I wanted it to
I wouldn't mind this behavior but if add more spacing between paragraphs (via the
LastLineSpacingSpan
) I'll end up with doubled bottom spacing for the last paragraph.The text was updated successfully, but these errors were encountered: