Skip to content

Commit c939c0f

Browse files
authored
Merge pull request #191 from noties/v4.2.1
V4.2.1
2 parents b844f4d + 34f71f1 commit c939c0f

File tree

22 files changed

+596
-45
lines changed

22 files changed

+596
-45
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
# 4.2.1
4+
* Fix SpannableBuilder `subSequence` method
5+
* Introduce Nougat check in `BulletListItemSpan` to position bullet (for bullets to be
6+
positioned correctly when nested inside other `LeadingMarginSpan`s)
7+
* Reduced number of invalidations in AsyncDrawable when result is ready
8+
* AsyncDrawable#hasKnownDimentions -> AsyncDrawable#hasKnownDimensions typo fix
9+
310
# 4.2.0
411
* `MarkwonEditor` to highlight markdown input whilst editing (new module: `markwon-editor`)
512
* `CoilImagesPlugin` image loader based on [Coil] library (new module: `markwon-image-coil`) ([#166], [#174])

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package="io.noties.markwon.app">
55

66
<uses-permission android:name="android.permission.INTERNET" />
7-
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
87

98
<application
109
android:name=".App"

app/src/main/java/io/noties/markwon/app/MarkdownRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import io.noties.markwon.html.HtmlPlugin;
2626
import io.noties.markwon.image.ImagesPlugin;
2727
import io.noties.markwon.image.file.FileSchemeHandler;
28+
import io.noties.markwon.image.gif.GifMediaDecoder;
2829
import io.noties.markwon.image.network.OkHttpNetworkSchemeHandler;
2930
import io.noties.markwon.syntax.Prism4jTheme;
3031
import io.noties.markwon.syntax.Prism4jThemeDarkula;
@@ -105,7 +106,8 @@ public void configureImages(@NonNull ImagesPlugin plugin) {
105106
// default-media-decoder is also added automatically
106107
plugin
107108
.addSchemeHandler(OkHttpNetworkSchemeHandler.create())
108-
.addSchemeHandler(FileSchemeHandler.createWithAssets(context.getAssets()));
109+
.addSchemeHandler(FileSchemeHandler.createWithAssets(context.getAssets()))
110+
.addMediaDecoder(GifMediaDecoder.create(false));
109111
}
110112
}))
111113
.usePlugin(SyntaxHighlightPlugin.create(prism4j, prism4jTheme))

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ buildscript {
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.5.2'
8-
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
7+
classpath 'com.android.tools.build:gradle:3.5.3'
8+
classpath 'com.github.ben-manes:gradle-versions-plugin:0.27.0'
99
}
1010
}
1111

@@ -55,6 +55,11 @@ ext {
5555
final def commonMarkVersion = '0.13.0'
5656
final def daggerVersion = '2.10'
5757

58+
// please note that `pl.droidsonroids.gif:android-gif-drawable:1.2.15` is used due to the minimum
59+
// api level mismatch that Markwon supports (16) and later versions of AndroidGifDrawable (17).
60+
// It should not be a problem as this dependency is used as `compileOnly` and users
61+
// must specify version explicitly (until library's API changes...)
62+
5863
deps = [
5964
'x-annotations' : 'androidx.annotation:annotation:1.1.0',
6065
'x-recycler-view' : 'androidx.recyclerview:recyclerview:1.0.0',
@@ -63,7 +68,7 @@ ext {
6368
'commonmark-strikethrough': "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:$commonMarkVersion",
6469
'commonmark-table' : "com.atlassian.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion",
6570
'android-svg' : 'com.caverock:androidsvg:1.4',
66-
'android-gif' : 'pl.droidsonroids.gif:android-gif-drawable:1.2.14',
71+
'android-gif' : 'pl.droidsonroids.gif:android-gif-drawable:1.2.15',
6772
'jlatexmath-android' : 'ru.noties:jlatexmath-android:0.1.0',
6873
'okhttp' : 'com.squareup.okhttp3:okhttp:3.9.0',
6974
'prism4j' : 'io.noties:prism4j:2.0.0',

docs/.vuepress/components/AwesomeGroup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
margin: 0.25em;
3333
border-radius: 0.25em;
3434
box-shadow: 0 0 0.1em 0.1em #eee;
35-
max-width: 30%;
35+
max-width: 25%;
3636
min-width: 100px;
3737
display: flex;
3838
align-items: center;
7.59 KB
Loading
3.46 KB
Loading
9.1 KB
Loading

docs/README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: 'Introduction'
66

77
<br><br>
88
[![markwon](https://img.shields.io/maven-central/v/io.noties.markwon/core.svg?label=markwon)](http://search.maven.org/#search|ga|1|g%3A%22io.noties.markwon%22%20)
9-
[![Build Status](https://travis-ci.org/noties/Markwon.svg?branch=master)](https://travis-ci.org/noties/Markwon)
9+
[![Build](https://github.com/noties/Markwon/workflows/Build/badge.svg)](https://github.com/noties/Markwon/actions)
1010

1111
**Markwon** is a markdown library for Android. It parses markdown following
1212
<Link name="commonmark-spec" /> with the help of amazing <Link name="commonmark-java" /> library
@@ -79,7 +79,26 @@ and 2 themes included: Light &amp; Dark. It can be downloaded from [releases](ht
7979
:::
8080

8181

82-
## Awesome Markwon
82+
<style>
83+
.awesome-block {
84+
background-color: #4CAF50;
85+
height: 7rem;
86+
display: flex;
87+
justify-content: center;
88+
align-items: center;
89+
}
90+
91+
.awesome-block * {
92+
border: 0
93+
}
94+
</style>
95+
96+
97+
<div class="awesome-block">
98+
99+
## # Awesome Markwon
100+
101+
</div>
83102

84103
<u>Applications using Markwon</u>:
85104

@@ -88,9 +107,12 @@ and 2 themes included: Light &amp; Dark. It can be downloaded from [releases](ht
88107
* [Boxcryptor](https://www.boxcryptor.com) - A software that adds AES-256 and RSA encryption to Dropbox, Google Drive, OneDrive and many other clouds.
89108

90109
<AwesomeGroup :apps="[
91-
{name: 'Cinopsys: Movies and Shows', image: 'http://drive.google.com/uc?export=view&id=1rD0HLd8tDUCe8QcVEG_iGvsJbFyozRhC', link: 'https://play.google.com/store/apps/details?id=com.cinopsys.movieshows'}
110+
{name: 'Nextcloud', image: $withBase(`/assets/apps/nextcloud.png`), link: 'https://github.com/nextcloud/android', description: 'A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.'},
111+
{name: 'Habitica', image: $withBase(`/assets/apps/habitica.png`), link: 'https://play.google.com/store/apps/details?id=com.habitrpg.android.habitica', description: 'Treat your life like a game to stay motivated and organized! Habitica makes it simple to have fun while accomplishing goals.'},
112+
{name: 'Cinopsys: Movies and Shows', image: $withBase(`/assets/apps/cinopsys.png`), link: 'https://play.google.com/store/apps/details?id=com.cinopsys.movieshows'}
92113
]" />
93114

115+
94116
<u>Extension/plugins</u>:
95117

96118
* [MarkwonCodeEx](https://github.com/kingideayou/MarkwonCodeEx) - Markwon extension support elegant code background.

docs/docs/v4/image/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,12 @@ imagesPlugin.addSchemeHandler(new SchemeHandler() {
184184
:::warning
185185
If you wish to add support for **SVG** or **GIF** you must explicitly add these dependencies
186186
to your project:
187-
* for `SVG`: `com.caverock:androidsvg:1.4`
188-
* for `GIF`: `pl.droidsonroids.gif:android-gif-drawable:1.2.14`
187+
* to support `SVG`: [com.caverock:androidsvg](https://github.com/BigBadaboom/androidsvg)
188+
* to support `GIF`: [pl.droidsonroids.gif:android-gif-drawable](https://github.com/koral--/android-gif-drawable)
189189

190-
You can try more recent versions of these libraries, but make sure that they doesn't
191-
introduce any unexpected behavior.
190+
For [security reasons](https://github.com/noties/Markwon/issues/186) it's advisable to use latest
191+
versions of these libraries. If you notice compilation and/or runtime issues when used with Markwon,
192+
please [create an issue](https://github.com/noties/Markwon/issues/new) specifying library and library version used.
192193
:::
193194

194195

0 commit comments

Comments
 (0)