Skip to content

Commit

Permalink
Prepare the 3.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitry Ivanov committed Mar 18, 2019
1 parent ab74222 commit 0b03dd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ implementation "ru.noties.markwon:core:${markwonVersion}"
Please visit [documentation] web-site for further reference


> You can find previous version of Markwon in [2.x.x](https://github.com/noties/Markwon/tree/2.x.x) branch

## Supported markdown features:
* Emphasis (`*`, `_`)
* Strong emphasis (`**`, `__`)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ org.gradle.configureondemand=true
android.enableBuildCache=true
android.buildCacheDir=build/pre-dex-cache

VERSION_NAME=3.0.0-SNAPSHOT
VERSION_NAME=3.0.0

GROUP=ru.noties.markwon
POM_DESCRIPTION=Markwon markdown for Android
Expand Down
15 changes: 3 additions & 12 deletions sample/src/main/java/ru/noties/markwon/sample/SampleItemView.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.support.annotation.NonNull;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.View;
Expand All @@ -14,20 +13,21 @@
import ru.noties.adapt.Holder;
import ru.noties.adapt.ItemView;
import ru.noties.markwon.Markwon;
import ru.noties.markwon.utils.NoCopySpannableFactory;

class SampleItemView extends ItemView<SampleItem, SampleItemView.SampleHolder> {

private final Markwon markwon;

// instance specific factory
private final NoCopySpannableFactory factory;
private final Spannable.Factory factory;

// instance specific cache
private final EnumMap<SampleItem, Spanned> cache;

SampleItemView(@NonNull Markwon markwon) {
this.markwon = markwon;
this.factory = new NoCopySpannableFactory();
this.factory = NoCopySpannableFactory.getInstance();
this.cache = new EnumMap<>(SampleItem.class);
}

Expand Down Expand Up @@ -72,13 +72,4 @@ static class SampleHolder extends Holder {
this.textView = requireView(R.id.text);
}
}

private static class NoCopySpannableFactory extends Spannable.Factory {
@Override
public Spannable newSpannable(CharSequence source) {
return source instanceof Spannable
? (Spannable) source
: new SpannableString(source);
}
}
}

0 comments on commit 0b03dd2

Please sign in to comment.