Skip to content

Commit

Permalink
Fix links not working in markdown tables (#744)
Browse files Browse the repository at this point in the history
Co-authored-by: Dessalines <[email protected]>
  • Loading branch information
MV-GH and dessalines authored Jun 19, 2023
1 parent ba8397c commit 7ccaec7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ import io.noties.markwon.core.CorePlugin
import io.noties.markwon.core.CorePlugin.OnTextAddedListener
import io.noties.markwon.core.CoreProps
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin
import io.noties.markwon.ext.tables.TableAwareMovementMethod
import io.noties.markwon.ext.tables.TablePlugin
import io.noties.markwon.html.HtmlPlugin
import io.noties.markwon.image.coil.CoilImagesPlugin
import io.noties.markwon.linkify.LinkifyPlugin
import io.noties.markwon.movement.MovementMethodPlugin
import org.commonmark.node.Link
import java.util.regex.Pattern

Expand Down Expand Up @@ -136,6 +138,9 @@ object MarkdownHelper {
.usePlugin(LemmyLinkPlugin())
.usePlugin(StrikethroughPlugin.create())
.usePlugin(TablePlugin.create(context))
// use TableAwareLinkMovementMethod to handle clicks inside tables,
// wraps LinkMovementMethod internally
.usePlugin(MovementMethodPlugin.create(TableAwareMovementMethod.create()))
.usePlugin(HtmlPlugin.create())
.usePlugin(object : AbstractMarkwonPlugin() {
override fun configureConfiguration(builder: MarkwonConfiguration.Builder) {
Expand Down

0 comments on commit 7ccaec7

Please sign in to comment.