From f29dad010e5d8415fe79a270f91cc7e1c7333ddf Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Wed, 20 Dec 2023 06:27:20 +0300 Subject: [PATCH] courses: better markdown tables (fixes #2820) (#2822) Co-authored-by: dogi --- app/build.gradle | 5 +++-- .../ole/planet/myplanet/ui/course/CourseStepFragment.java | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d97964468..522711ea0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1201 - versionName "0.12.1" + versionCode 1202 + versionName "0.12.2" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -134,6 +134,7 @@ dependencies { implementation "io.noties.markwon:editor:4.6.2" implementation "io.noties.markwon:image:4.6.2" implementation "io.noties.markwon:html:4.6.2" + implementation "io.noties.markwon:ext-tables:4.6.2" implementation 'com.caverock:androidsvg-aar:1.4' implementation "androidx.core:core-ktx:1.12.0" implementation "com.github.VaibhavLakhera:Circular-Progress-View:0.1.2" diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/course/CourseStepFragment.java b/app/src/main/java/org/ole/planet/myplanet/ui/course/CourseStepFragment.java index a179cfdc9..164554377 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/course/CourseStepFragment.java +++ b/app/src/main/java/org/ole/planet/myplanet/ui/course/CourseStepFragment.java @@ -42,6 +42,7 @@ import io.noties.markwon.AbstractMarkwonPlugin; import io.noties.markwon.Markwon; import io.noties.markwon.MarkwonPlugin; +import io.noties.markwon.ext.tables.TablePlugin; import io.noties.markwon.html.HtmlPlugin; import io.noties.markwon.image.ImagesPlugin; import io.noties.markwon.image.file.FileSchemeHandler; @@ -79,6 +80,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) { .usePlugin(HtmlPlugin.create()) .usePlugin(ImagesPlugin.create()) .usePlugin(MovementMethodPlugin.none()) + .usePlugin(TablePlugin.create(context)) .usePlugin(new AbstractMarkwonPlugin() { @Override public void configure(@NonNull MarkwonPlugin.Registry registry) {