Simplification

pull/183/head
M66B 5 years ago
parent 14c533d95f
commit 23eb8b1c97

@ -2230,15 +2230,7 @@ public class HtmlHelper {
static Spanned fromHtml(@NonNull String html, boolean compress, @Nullable Html.ImageGetter imageGetter, @Nullable Html.TagHandler tagHandler, Context context) {
Document document = JsoupEx.parse(html);
Spanned spanned = fromDocument(context, document, false, compress, imageGetter, tagHandler);
int i = spanned.length();
while (i > 1 && spanned.charAt(i - 2) == '\n' && spanned.charAt(i - 1) == '\n')
i--;
if (i != spanned.length())
spanned = (Spanned) spanned.subSequence(0, i);
return spanned;
return fromDocument(context, document, false, compress, imageGetter, tagHandler);
}
static String toHtml(Spanned spanned, Context context) {

Loading…
Cancel
Save