fix: add workaround to make it possible to see quotes spanning multiple-paragraphs (#280)

This commit is contained in:
Dieguitux 2025-01-19 11:08:46 +01:00 committed by GitHub
parent 5fb294b2bb
commit 634fd1430d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,12 +75,12 @@ private fun String.quoteFixUp(): String =
lines().forEach { originalLine ->
val cleanLine =
originalLine
// removes list inside quotes
// fix bug due to which list inside quotes are not rendered correctly
.replace(Regex("^>-"), "> •")
.replace(Regex("^> -"), "> •")
.replace(Regex("^> \\*"), "> •")
// empty quotes
.replace(Regex("^>\\s*$"), " \n")
// fix bug due to which only first paragraph is shown in quote if "> \n" occurs
.replace(Regex("^>\\s*$"), "> ")
if (cleanLine.isNotEmpty()) {
finalLines += cleanLine
}