From 1de3b01063d08fd7d5d8ec396d8912ca8f605c12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:32:27 +0200 Subject: [PATCH] chore(deps): bump multiplatform-markdown-renderer from 0.21.0 to 0.22.0 (#1039) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Diego Beraldin --- .../diegoberaldin/raccoonforlemmy/core/markdown/Utils.kt | 6 +----- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/markdown/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/markdown/Utils.kt b/core/markdown/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/markdown/Utils.kt index 3abae8270..94f348646 100644 --- a/core/markdown/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/markdown/Utils.kt +++ b/core/markdown/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/markdown/Utils.kt @@ -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 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d7861366f..bc491d0f2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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"