Update version to 2.0.0 release

This commit is contained in:
Dimitry Ivanov 2018-09-17 13:09:29 +03:00
parent 18b58d7e1f
commit 3ba6c836aa
4 changed files with 26 additions and 16 deletions

View File

@ -1,6 +1,26 @@
# Changelog
# v1.1.1
# 2.0.0
* Add `html-parser-api` and `html-parser-impl` modules
* Add `HtmlEmptyTagReplacement`
* Implement Appendable and CharSequence in SpannableBuilder
* Renamed library modules to reflect maven artifact names
* Rename `markwon-syntax` to `markwon-syntax-highlight`
* Add HtmlRenderer asbtraction
* Add CssInlineStyleParser
* Fix Theme#listItemColor and OL
* Fix task list block parser to revert parsing state when line is not matching
* Defined test format files
* image-loader add datauri parser
* image-loader add support for inline data uri image references
* Add travis configuration
* Fix image with width greater than canvas scaled
* Fix blockquote span
* Dealing with white spaces at the end of a document
* image-loader add SchemeHandler abstraction
* Add sample-latex-math module
## v1.1.1
* Fix OrderedListItemSpan text position (baseline) (<GithubIssue id="55" />)
* Add softBreakAddsNewLine option for SpannableConfiguration (<GithubIssue id="54" />)
* Paragraph text can now explicitly be spanned (<GithubPull id="58" />)<br>Thanks to <GithubUser name="c-b-h" />

View File

@ -6,7 +6,7 @@ org.gradle.configureondemand=true
android.enableBuildCache=true
android.buildCacheDir=build/pre-dex-cache
VERSION_NAME=2.0.0-SNAPSHOT
VERSION_NAME=2.0.0
GROUP=ru.noties
POM_DESCRIPTION=Markwon

View File

@ -45,9 +45,9 @@ public class SpannableBuilder implements Appendable, CharSequence {
}
private static boolean isPositionValid(int length, int start, int end) {
return !(end <= start
|| start < 0
|| end > length);
return end > start
&& start >= 0
&& end <= length;
}

View File

@ -508,17 +508,7 @@ public class SpannableMarkdownVisitor extends AbstractVisitor {
}
private void setSpan(int start, @Nullable Object span) {
if (span != null) {
final int length = builder.length();
SpannableBuilder.setSpans(
builder,
span,
start,
length
);
}
SpannableBuilder.setSpans(builder, span, start, builder.length());
}
private void newLine() {