Prepare 4.1.1 release
This commit is contained in:
parent
008faa6f49
commit
0a7356ecf8
@ -1,6 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
# 4.1.1-SNAPSHOT
|
# 4.1.1
|
||||||
* `markwon-ext-tables`: fix padding between subsequent table blocks ([#159])
|
* `markwon-ext-tables`: fix padding between subsequent table blocks ([#159])
|
||||||
* `markwon-images`: print a single warning instead full stacktrace in case when SVG or GIF
|
* `markwon-images`: print a single warning instead full stacktrace in case when SVG or GIF
|
||||||
are not present in the classpath ([#160])
|
are not present in the classpath ([#160])
|
||||||
|
@ -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.1.1-SNAPSHOT
|
VERSION_NAME=4.1.1
|
||||||
|
|
||||||
GROUP=io.noties.markwon
|
GROUP=io.noties.markwon
|
||||||
POM_DESCRIPTION=Markwon markdown for Android
|
POM_DESCRIPTION=Markwon markdown for Android
|
||||||
|
@ -104,7 +104,7 @@ class MarkwonBuilderImpl implements Markwon.Builder {
|
|||||||
|
|
||||||
final RenderProps renderProps = new RenderPropsImpl();
|
final RenderProps renderProps = new RenderPropsImpl();
|
||||||
|
|
||||||
// @since 4.1.1-SNAPSHOT
|
// @since 4.1.1
|
||||||
final MarkwonVisitorFactory visitorFactory = MarkwonVisitorFactory.create(
|
final MarkwonVisitorFactory visitorFactory = MarkwonVisitorFactory.create(
|
||||||
visitorBuilder,
|
visitorBuilder,
|
||||||
configuration,
|
configuration,
|
||||||
|
@ -20,7 +20,7 @@ class MarkwonImpl extends Markwon {
|
|||||||
|
|
||||||
private final TextView.BufferType bufferType;
|
private final TextView.BufferType bufferType;
|
||||||
private final Parser parser;
|
private final Parser parser;
|
||||||
private final MarkwonVisitorFactory visitorFactory; // @since 4.1.1-SNAPSHOT
|
private final MarkwonVisitorFactory visitorFactory; // @since 4.1.1
|
||||||
private final List<MarkwonPlugin> plugins;
|
private final List<MarkwonPlugin> plugins;
|
||||||
|
|
||||||
// @since 4.1.0
|
// @since 4.1.0
|
||||||
@ -60,7 +60,7 @@ class MarkwonImpl extends Markwon {
|
|||||||
plugin.beforeRender(node);
|
plugin.beforeRender(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @since 4.1.1-SNAPSHOT obtain visitor via factory
|
// @since 4.1.1 obtain visitor via factory
|
||||||
final MarkwonVisitor visitor = visitorFactory.create();
|
final MarkwonVisitor visitor = visitorFactory.create();
|
||||||
|
|
||||||
node.accept(visitor);
|
node.accept(visitor);
|
||||||
@ -73,7 +73,7 @@ class MarkwonImpl extends Markwon {
|
|||||||
final Spanned spanned = visitor.builder().spannableStringBuilder();
|
final Spanned spanned = visitor.builder().spannableStringBuilder();
|
||||||
|
|
||||||
// clear render props and builder after rendering
|
// clear render props and builder after rendering
|
||||||
// @since 4.1.1-SNAPSHOT as we no longer reuse visitor - there is no need to clean it
|
// @since 4.1.1 as we no longer reuse visitor - there is no need to clean it
|
||||||
// we might still do it if we introduce a thread-local storage though
|
// we might still do it if we introduce a thread-local storage though
|
||||||
// visitor.clear();
|
// visitor.clear();
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package io.noties.markwon;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1.1-SNAPSHOT
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
abstract class MarkwonVisitorFactory {
|
abstract class MarkwonVisitorFactory {
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ class MarkwonVisitorImpl implements MarkwonVisitor {
|
|||||||
@Override
|
@Override
|
||||||
public <N extends Node> Builder on(@NonNull Class<N> node, @Nullable NodeVisitor<? super N> nodeVisitor) {
|
public <N extends Node> Builder on(@NonNull Class<N> node, @Nullable NodeVisitor<? super N> nodeVisitor) {
|
||||||
|
|
||||||
// @since 4.1.1-SNAPSHOT we might actually introduce a local flag to check if it's been built
|
// @since 4.1.1 we might actually introduce a local flag to check if it's been built
|
||||||
// and throw an exception here if some modification is requested
|
// and throw an exception here if some modification is requested
|
||||||
// NB, as we might be built from different threads this flag must be synchronized
|
// NB, as we might be built from different threads this flag must be synchronized
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ public class CorePlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
visitor.builder().append('\u00a0');
|
visitor.builder().append('\u00a0');
|
||||||
|
|
||||||
// @since 4.1.1-SNAPSHOT
|
// @since 4.1.1
|
||||||
CoreProps.CODE_BLOCK_INFO.set(visitor.renderProps(), info);
|
CoreProps.CODE_BLOCK_INFO.set(visitor.renderProps(), info);
|
||||||
|
|
||||||
visitor.setSpansForNodeOptional(node, length);
|
visitor.setSpansForNodeOptional(node, length);
|
||||||
|
@ -20,7 +20,7 @@ public abstract class CoreProps {
|
|||||||
public static final Prop<Boolean> PARAGRAPH_IS_IN_TIGHT_LIST = Prop.of("paragraph-is-in-tight-list");
|
public static final Prop<Boolean> PARAGRAPH_IS_IN_TIGHT_LIST = Prop.of("paragraph-is-in-tight-list");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1.1-SNAPSHOT
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
public static final Prop<String> CODE_BLOCK_INFO = Prop.of("code-block-info");
|
public static final Prop<String> CODE_BLOCK_INFO = Prop.of("code-block-info");
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ public class MarkwonImplTest {
|
|||||||
|
|
||||||
impl.render(mock(Node.class));
|
impl.render(mock(Node.class));
|
||||||
|
|
||||||
// obsolete starting with 4.1.1-SNAPSHOT
|
// obsolete starting with 4.1.1
|
||||||
// verify(visitor, times(1)).clear();
|
// verify(visitor, times(1)).clear();
|
||||||
verify(visitor, never()).clear();
|
verify(visitor, never()).clear();
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@ public class MarkwonImplTest {
|
|||||||
|
|
||||||
assertTrue(flag.get());
|
assertTrue(flag.get());
|
||||||
|
|
||||||
// obsolete starting with 4.1.1-SNAPSHOT
|
// obsolete starting with 4.1.1
|
||||||
// verify(renderProps, times(1)).clearAll();
|
// verify(renderProps, times(1)).clearAll();
|
||||||
verify(renderProps, never()).clearAll();
|
verify(renderProps, never()).clearAll();
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ public class TablePlugin extends AbstractMarkwonPlugin {
|
|||||||
|
|
||||||
void configure(@NonNull MarkwonVisitor.Builder builder) {
|
void configure(@NonNull MarkwonVisitor.Builder builder) {
|
||||||
builder
|
builder
|
||||||
// @since 4.1.1-SNAPSHOT we use TableBlock instead of TableBody to add new lines
|
// @since 4.1.1 we use TableBlock instead of TableBody to add new lines
|
||||||
.on(TableBlock.class, new MarkwonVisitor.NodeVisitor<TableBlock>() {
|
.on(TableBlock.class, new MarkwonVisitor.NodeVisitor<TableBlock>() {
|
||||||
@Override
|
@Override
|
||||||
public void visit(@NonNull MarkwonVisitor visitor, @NonNull TableBlock tableBlock) {
|
public void visit(@NonNull MarkwonVisitor visitor, @NonNull TableBlock tableBlock) {
|
||||||
|
@ -17,7 +17,7 @@ public abstract class GifSupport {
|
|||||||
pl.droidsonroids.gif.GifDrawable.class.getName();
|
pl.droidsonroids.gif.GifDrawable.class.getName();
|
||||||
result = true;
|
result = true;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
// @since 4.1.1-SNAPSHOT instead of printing full stacktrace of the exception,
|
// @since 4.1.1 instead of printing full stacktrace of the exception,
|
||||||
// just print a warning to the console
|
// just print a warning to the console
|
||||||
Log.w("MarkwonImagesPlugin", missingMessage());
|
Log.w("MarkwonImagesPlugin", missingMessage());
|
||||||
result = false;
|
result = false;
|
||||||
@ -30,7 +30,7 @@ public abstract class GifSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1.1-SNAPSHOT
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
static String missingMessage() {
|
static String missingMessage() {
|
||||||
|
@ -17,7 +17,7 @@ public abstract class SvgSupport {
|
|||||||
com.caverock.androidsvg.SVG.class.getName();
|
com.caverock.androidsvg.SVG.class.getName();
|
||||||
result = true;
|
result = true;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
// @since 4.1.1-SNAPSHOT instead of printing full stacktrace of the exception,
|
// @since 4.1.1 instead of printing full stacktrace of the exception,
|
||||||
// just print a warning to the console
|
// just print a warning to the console
|
||||||
Log.w("MarkwonImagesPlugin", missingMessage());
|
Log.w("MarkwonImagesPlugin", missingMessage());
|
||||||
result = false;
|
result = false;
|
||||||
@ -30,7 +30,7 @@ public abstract class SvgSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 4.1.1-SNAPSHOT
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
static String missingMessage() {
|
static String missingMessage() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user