From 4b2d38b92f85230d7ca193d65b8b653a6a0670ff Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Thu, 7 Nov 2019 17:48:34 +0300 Subject: [PATCH] Minor clean up --- README.md | 3 +++ gradle.properties | 2 +- markwon-editor/README.md | 3 +++ .../java/io/noties/markwon/sample/editor/EditorActivity.java | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d053f8c2..594d9781 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ features listed in [commonmark-spec] are supported (including support for **inlined/block HTML code**, **markdown tables**, **images** and **syntax highlight**). +Since version **4.2.0** **Markwon** comes with an [editor](./markwon-editor/) to _highlight_ markdown input +as user types (for example in **EditText**). + [commonmark-spec]: https://spec.commonmark.org/0.28/ [commonmark-java]: https://github.com/atlassian/commonmark-java/blob/master/README.md diff --git a/gradle.properties b/gradle.properties index ba5cc764..c87f3936 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ android.enableJetifier=true android.enableBuildCache=true android.buildCacheDir=build/pre-dex-cache -VERSION_NAME=4.1.3-SNAPSHOT +VERSION_NAME=4.2.0-SNAPSHOT GROUP=io.noties.markwon POM_DESCRIPTION=Markwon markdown for Android diff --git a/markwon-editor/README.md b/markwon-editor/README.md index f191ee4f..388306e3 100644 --- a/markwon-editor/README.md +++ b/markwon-editor/README.md @@ -6,6 +6,9 @@ Main principle: _difference_ between input text and rendered markdown is conside _punctuation_. +[https://noties.io/Markwon/docs/v4/editor/](https://noties.io/Markwon/docs/v4/editor/) + + ## Limitations Tables and LaTeX nodes won't be rendered correctly. They will be treated as _punctuation_ diff --git a/sample/src/main/java/io/noties/markwon/sample/editor/EditorActivity.java b/sample/src/main/java/io/noties/markwon/sample/editor/EditorActivity.java index 271b6b69..25ff6a47 100644 --- a/sample/src/main/java/io/noties/markwon/sample/editor/EditorActivity.java +++ b/sample/src/main/java/io/noties/markwon/sample/editor/EditorActivity.java @@ -272,7 +272,7 @@ public class EditorActivity extends Activity { final String text = editText.getText().subSequence(start, end).toString(); int index = text.indexOf('\n'); while (index != -1) { - newLines.add(start + index); + newLines.add(start + index + 1); index = text.indexOf('\n', index + 1); }