chore(deps): bump multiplatform-markdown-renderer from 0.21.0 to 0.22.0 (#1039)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Diego Beraldin <diego.beraldin@gmail.com>
This commit is contained in:
dependabot[bot] 2024-06-24 19:32:27 +02:00 committed by GitHub
parent bbd88b7acc
commit 1de3b01063
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -25,7 +25,6 @@ internal fun String.sanitize(): String =
.expandLemmyHandles()
.dollarSignFixUp()
.unescapeMarkdown()
.emptyLinkFixup()
.imageBeforeFixup()
.imageAfterFixup()
@ -90,15 +89,12 @@ private fun String.dollarSignFixUp(): String =
// due to a bug in how the renderer builds annotated strings, replace with full width dollar sign
replace("$", "\uff04")
private fun String.emptyLinkFixup(): String = replace("[]()", "")
private fun String.imageBeforeFixup(): String =
// due to a bug in the renderer, images after a new line must be on a paragraph on their own,
// so an additional newline must be inserted (they are nor inline nor a block otherwise)
ImageRegex.imageNotAfter2Newlines.replace(this, "$1\n\n$2")
private fun String.imageAfterFixup(): String =
ImageRegex.imageAddNewLineAfter.replace(this, "$1$2\n\n$3")
private fun String.imageAfterFixup(): String = ImageRegex.imageAddNewLineAfter.replace(this, "$1$2\n\n$3")
private fun String.unescapeMarkdown(): String =
// due to a bug in the library, markdown escapes are NOT recognized, quick workaround to replace them with similar characters

View File

@ -23,7 +23,7 @@ ktorfit = "2.0.0-rc01"
lyricist = "1.7.0"
materialKolor = "1.7.0"
mockk = "1.13.11"
multiplatform-markdown-renderer = "0.21.0"
multiplatform-markdown-renderer = "0.22.0"
multiplatform-settings = "1.1.1"
reorderable = "2.1.1"
stately = "2.0.7"