Prepare 4.2.0 release
This commit is contained in:
parent
00d60e2399
commit
39177057af
@ -1,6 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
# 4.2.0-SNAPSHOT
|
# 4.2.0
|
||||||
* `MarkwonEditor` to highlight markdown input whilst editing (new module: `markwon-editor`)
|
* `MarkwonEditor` to highlight markdown input whilst editing (new module: `markwon-editor`)
|
||||||
* `CoilImagesPlugin` image loader based on [Coil] library (new module: `markwon-image-coil`) ([#166], [#174])
|
* `CoilImagesPlugin` image loader based on [Coil] library (new module: `markwon-image-coil`) ([#166], [#174])
|
||||||
<br>Thanks to [@tylerbwong]
|
<br>Thanks to [@tylerbwong]
|
||||||
|
@ -8,7 +8,7 @@ android.enableJetifier=true
|
|||||||
android.enableBuildCache=true
|
android.enableBuildCache=true
|
||||||
android.buildCacheDir=build/pre-dex-cache
|
android.buildCacheDir=build/pre-dex-cache
|
||||||
|
|
||||||
VERSION_NAME=4.2.0-SNAPSHOT
|
VERSION_NAME=4.2.0
|
||||||
|
|
||||||
GROUP=io.noties.markwon
|
GROUP=io.noties.markwon
|
||||||
POM_DESCRIPTION=Markwon markdown for Android
|
POM_DESCRIPTION=Markwon markdown for Android
|
||||||
|
@ -79,7 +79,7 @@ public class HeadingSpan extends MetricAffectingSpan implements LeadingMarginSpa
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public int getLevel() {
|
public int getLevel() {
|
||||||
return level;
|
return level;
|
||||||
|
@ -36,7 +36,7 @@ public class LinkSpan extends URLSpan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public String getLink() {
|
public String getLink() {
|
||||||
|
@ -8,7 +8,7 @@ import io.noties.markwon.Markwon;
|
|||||||
* @see EditHandler
|
* @see EditHandler
|
||||||
* @see io.noties.markwon.editor.handler.EmphasisEditHandler
|
* @see io.noties.markwon.editor.handler.EmphasisEditHandler
|
||||||
* @see io.noties.markwon.editor.handler.StrongEmphasisEditHandler
|
* @see io.noties.markwon.editor.handler.StrongEmphasisEditHandler
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractEditHandler<T> implements EditHandler<T> {
|
public abstract class AbstractEditHandler<T> implements EditHandler<T> {
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,7 +11,7 @@ import io.noties.markwon.editor.handler.StrongEmphasisEditHandler;
|
|||||||
/**
|
/**
|
||||||
* @see EmphasisEditHandler
|
* @see EmphasisEditHandler
|
||||||
* @see StrongEmphasisEditHandler
|
* @see StrongEmphasisEditHandler
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public interface EditHandler<T> {
|
public interface EditHandler<T> {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import io.noties.markwon.Markwon;
|
|||||||
* @see #create(Markwon)
|
* @see #create(Markwon)
|
||||||
* @see #process(Editable)
|
* @see #process(Editable)
|
||||||
* @see #preRender(Editable, PreRenderResultListener)
|
* @see #preRender(Editable, PreRenderResultListener)
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class MarkwonEditor {
|
public abstract class MarkwonEditor {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import java.util.concurrent.Future;
|
|||||||
* @see MarkwonEditor#preRender(Editable, MarkwonEditor.PreRenderResultListener)
|
* @see MarkwonEditor#preRender(Editable, MarkwonEditor.PreRenderResultListener)
|
||||||
* @see #withProcess(MarkwonEditor)
|
* @see #withProcess(MarkwonEditor)
|
||||||
* @see #withPreRender(MarkwonEditor, ExecutorService, EditText)
|
* @see #withPreRender(MarkwonEditor, ExecutorService, EditText)
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class MarkwonEditorTextWatcher implements TextWatcher {
|
public abstract class MarkwonEditorTextWatcher implements TextWatcher {
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class MarkwonEditorUtils {
|
public abstract class MarkwonEditorUtils {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import static io.noties.markwon.editor.MarkwonEditorUtils.extractSpans;
|
|||||||
*
|
*
|
||||||
* @see EditHandler#handleMarkdownSpan(PersistedSpans, Editable, String, Object, int, int)
|
* @see EditHandler#handleMarkdownSpan(PersistedSpans, Editable, String, Object, int, int)
|
||||||
* @see EditHandler#configurePersistedSpans(Builder)
|
* @see EditHandler#configurePersistedSpans(Builder)
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class PersistedSpans {
|
public abstract class PersistedSpans {
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import io.noties.markwon.editor.MarkwonEditorUtils;
|
|||||||
import io.noties.markwon.editor.PersistedSpans;
|
import io.noties.markwon.editor.PersistedSpans;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class EmphasisEditHandler extends AbstractEditHandler<EmphasisSpan> {
|
public class EmphasisEditHandler extends AbstractEditHandler<EmphasisSpan> {
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import io.noties.markwon.editor.MarkwonEditorUtils;
|
|||||||
import io.noties.markwon.editor.PersistedSpans;
|
import io.noties.markwon.editor.PersistedSpans;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class StrongEmphasisEditHandler extends AbstractEditHandler<StrongEmphasisSpan> {
|
public class StrongEmphasisEditHandler extends AbstractEditHandler<StrongEmphasisSpan> {
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import io.noties.markwon.image.ImageSpanFactory;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Tyler Wong
|
* @author Tyler Wong
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class CoilImagesPlugin extends AbstractMarkwonPlugin {
|
public class CoilImagesPlugin extends AbstractMarkwonPlugin {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import java.util.Collections;
|
|||||||
import io.noties.markwon.image.MediaDecoder;
|
import io.noties.markwon.image.MediaDecoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class SvgPictureMediaDecoder extends MediaDecoder {
|
public class SvgPictureMediaDecoder extends MediaDecoder {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Parses autolinks, for example {@code <me@mydoma.in>}
|
* Parses autolinks, for example {@code <me@mydoma.in>}
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class AutolinkInlineProcessor extends InlineProcessor {
|
public class AutolinkInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import org.commonmark.node.Node;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class BackslashInlineProcessor extends InlineProcessor {
|
public class BackslashInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Parses inline code surrounded with {@code `} chars {@code `code`}
|
* Parses inline code surrounded with {@code `} chars {@code `code`}
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class BackticksInlineProcessor extends InlineProcessor {
|
public class BackticksInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.commonmark.node.Text;
|
|||||||
/**
|
/**
|
||||||
* Parses markdown images {@code }
|
* Parses markdown images {@code }
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class BangInlineProcessor extends InlineProcessor {
|
public class BangInlineProcessor extends InlineProcessor {
|
||||||
@Override
|
@Override
|
||||||
|
@ -15,7 +15,7 @@ import static io.noties.markwon.inlineparser.InlineParserUtils.mergeChildTextNod
|
|||||||
* Parses markdown link or image, relies on {@link OpenBracketInlineProcessor}
|
* Parses markdown link or image, relies on {@link OpenBracketInlineProcessor}
|
||||||
* to handle start of these elements
|
* to handle start of these elements
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class CloseBracketInlineProcessor extends InlineProcessor {
|
public class CloseBracketInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Parses HTML entities {@code &}
|
* Parses HTML entities {@code &}
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class EntityInlineProcessor extends InlineProcessor {
|
public class EntityInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.regex.Pattern;
|
|||||||
/**
|
/**
|
||||||
* Parses inline HTML tags
|
* Parses inline HTML tags
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class HtmlInlineProcessor extends InlineProcessor {
|
public class HtmlInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import org.commonmark.node.Node;
|
|||||||
import org.commonmark.node.Text;
|
import org.commonmark.node.Text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class InlineParserUtils {
|
public abstract class InlineParserUtils {
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import java.util.regex.Pattern;
|
|||||||
* @see OpenBracketInlineProcessor
|
* @see OpenBracketInlineProcessor
|
||||||
* @see MarkwonInlineParser.FactoryBuilder#addInlineProcessor(InlineProcessor)
|
* @see MarkwonInlineParser.FactoryBuilder#addInlineProcessor(InlineProcessor)
|
||||||
* @see MarkwonInlineParser.FactoryBuilder#excludeInlineProcessor(Class)
|
* @see MarkwonInlineParser.FactoryBuilder#excludeInlineProcessor(Class)
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public abstract class InlineProcessor {
|
public abstract class InlineProcessor {
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import static io.noties.markwon.inlineparser.InlineParserUtils.mergeTextNodesBet
|
|||||||
* @see #factoryBuilder()
|
* @see #factoryBuilder()
|
||||||
* @see #factoryBuilderNoDefaults()
|
* @see #factoryBuilderNoDefaults()
|
||||||
* @see FactoryBuilder
|
* @see FactoryBuilder
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class MarkwonInlineParser implements InlineParser, MarkwonInlineParserContext {
|
public class MarkwonInlineParser implements InlineParser, MarkwonInlineParserContext {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class NewLineInlineProcessor extends InlineProcessor {
|
public class NewLineInlineProcessor extends InlineProcessor {
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import org.commonmark.node.Text;
|
|||||||
/**
|
/**
|
||||||
* Parses markdown links {@code [link](#href)}
|
* Parses markdown links {@code [link](#href)}
|
||||||
*
|
*
|
||||||
* @since 4.2.0-SNAPSHOT
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public class OpenBracketInlineProcessor extends InlineProcessor {
|
public class OpenBracketInlineProcessor extends InlineProcessor {
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,14 +69,14 @@ public class LinkifyPlugin extends AbstractMarkwonPlugin {
|
|||||||
@Override
|
@Override
|
||||||
public void onTextAdded(@NonNull MarkwonVisitor visitor, @NonNull String text, int start) {
|
public void onTextAdded(@NonNull MarkwonVisitor visitor, @NonNull String text, int start) {
|
||||||
|
|
||||||
// @since 4.2.0-SNAPSHOT obtain span factory for links
|
// @since 4.2.0 obtain span factory for links
|
||||||
// we will be using the link that is used by markdown (instead of directly applying URLSpan)
|
// we will be using the link that is used by markdown (instead of directly applying URLSpan)
|
||||||
final SpanFactory spanFactory = visitor.configuration().spansFactory().get(Link.class);
|
final SpanFactory spanFactory = visitor.configuration().spansFactory().get(Link.class);
|
||||||
if (spanFactory == null) {
|
if (spanFactory == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @since 4.2.0-SNAPSHOT we no longer re-use builder (thread safety achieved for
|
// @since 4.2.0 we no longer re-use builder (thread safety achieved for
|
||||||
// render calls from different threads and ... better performance)
|
// render calls from different threads and ... better performance)
|
||||||
final SpannableStringBuilder builder = new SpannableStringBuilder(text);
|
final SpannableStringBuilder builder = new SpannableStringBuilder(text);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user