From f1ce020fabb7a80303283fc7b543b929a8e594dc Mon Sep 17 00:00:00 2001 From: Gregor Santner Date: Tue, 2 Mar 2021 19:39:08 +0100 Subject: [PATCH] Markdown: Enable flexmark-superscript extension, closes #1268 , change by @gsantner * syntax: value^2^ * https://github.com/vsch/flexmark-java/wiki/Extensions#superscript * https://github.com/vsch/flexmark-java/blob/0.42/flexmark-ext-superscript/src/main/javadoc/overview.md * Also update flexmark-markdown parser to latest 0.42 release --- CHANGELOG.md | 2 +- app/build.gradle | 2 +- .../gsantner/markor/format/markdown/MarkdownTextConverter.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa3cf7d03..4671efe045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ### Recent changes -- +- Markdown: Suport superscript^2^ syntax, #1268 by @gsantner ### v2.6 [Blog Post](https://gsantner.net/blog/2021/02/28/markor-v2.6-per-file-settings-zim-wiki-markdown-newline-paragraph.html?source=changelog) - Markdown: Add settings option for newlines to start new paragraphs, #1260 by @gsantner diff --git a/app/build.gradle b/app/build.gradle index c65ed8587c..d13f89651d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,7 +17,7 @@ if (enable_plugin_kotlin) { rootProject.ext.version_minSdk = 16 // https://github.com/vsch/flexmark-java/releases -ext.version_library_flexmark = "0.42.10" +ext.version_library_flexmark = "0.42.14" android { buildToolsVersion rootProject.ext.version_buildTools diff --git a/app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java b/app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java index 1064c195ba..88212eb44b 100644 --- a/app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java +++ b/app/src/main/java/net/gsantner/markor/format/markdown/MarkdownTextConverter.java @@ -31,6 +31,7 @@ import com.vladsch.flexmark.ext.yaml.front.matter.YamlFrontMatterExtension; import com.vladsch.flexmark.html.HtmlRenderer; import com.vladsch.flexmark.parser.Parser; +import com.vladsch.flexmark.superscript.SuperscriptExtension; import com.vladsch.flexmark.util.builder.Extension; import com.vladsch.flexmark.util.options.MutableDataSet; @@ -102,6 +103,7 @@ public class MarkdownTextConverter extends TextConverter { InsExtension.create(), JekyllTagExtension.create(), JekyllFrontMatterExtension.create(), + SuperscriptExtension.create(), // https://github.com/vsch/flexmark-java/wiki/Extensions#superscript TablesExtension.create(), TaskListExtension.create(), EmojiExtension.create(),