Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2021-04-26 12:23:07 +0300
committerStefan Niedermann <info@niedermann.it>2021-04-26 12:23:07 +0300
commitef7e2815b0835390227e16562f8f531b198c27bd (patch)
treea78aa38cc81591913d7c9c91472070474a658536
parent691408e99ca76cac11a9a586e36d9390f523e01d (diff)
Fix #1115 🌐 Support links in tables
-rw-r--r--fastlane/metadata/android/en-US/changelogs/3004001.txt3
-rw-r--r--markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownViewer.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/fastlane/metadata/android/en-US/changelogs/3004001.txt b/fastlane/metadata/android/en-US/changelogs/3004001.txt
index 3d40e264..42471085 100644
--- a/fastlane/metadata/android/en-US/changelogs/3004001.txt
+++ b/fastlane/metadata/android/en-US/changelogs/3004001.txt
@@ -1,2 +1,3 @@
- ⚠️️ Display confirm dialog when deleting an account with unsynchronized changes (#989) - by @AlpAcA0072
-- ➖ Allow dashes in note titles (#1104) \ No newline at end of file
+- ➖ Allow dashes in note titles (#1104)
+- 🌐 Support links in tables (#1115) \ No newline at end of file
diff --git a/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownViewer.java b/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownViewer.java
index 836a8536..d41681c3 100644
--- a/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownViewer.java
+++ b/markdown/src/main/java/it/niedermann/android/markdown/markwon/MarkwonMarkdownViewer.java
@@ -22,12 +22,14 @@ import io.noties.markwon.Markwon;
import io.noties.markwon.MarkwonPlugin;
import io.noties.markwon.SoftBreakAddsNewLinePlugin;
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.ext.tasklist.TaskListPlugin;
import io.noties.markwon.image.DefaultDownScalingMediaDecoder;
import io.noties.markwon.image.ImagesPlugin;
import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin;
import io.noties.markwon.linkify.LinkifyPlugin;
+import io.noties.markwon.movement.MovementMethodPlugin;
import io.noties.markwon.simple.ext.SimpleExtPlugin;
import io.noties.markwon.syntax.Prism4jTheme;
import io.noties.markwon.syntax.Prism4jThemeDarkula;
@@ -86,6 +88,7 @@ public class MarkwonMarkdownViewer extends AppCompatTextView implements Markdown
.usePlugin(TablePlugin.create(context))
.usePlugin(TaskListPlugin.create(context))
.usePlugin(LinkifyPlugin.create(true))
+ .usePlugin(MovementMethodPlugin.create(TableAwareMovementMethod.create()))
.usePlugin(LinkClickInterceptorPlugin.create())
.usePlugin(ImagesPlugin.create(plugin -> plugin.defaultMediaDecoder(DefaultDownScalingMediaDecoder.create(context.getResources().getDisplayMetrics().widthPixels, 0))))
.usePlugin(SoftBreakAddsNewLinePlugin.create())