Merge branch 'fix/markdown-lists' into feature/more-html-tags

This commit is contained in:
sk
2022-11-30 11:45:26 +01:00

View File

@@ -146,7 +146,7 @@ public class HtmlParser{
} }
} }
} }
final static List<String> blockElements = Arrays.asList("p", "ul", "ol", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6"); final static List<String> blockElements = Arrays.asList("p", "ul", "ol", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6");
@Override @Override
@@ -163,8 +163,8 @@ public class HtmlParser{
ssb.setSpan(si.span, si.start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ssb.setSpan(si.span, si.start, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
openSpans.remove(openSpans.size()-1); openSpans.remove(openSpans.size()-1);
} }
if("li".equals(el.nodeName())) { if("li".equals(el.nodeName()) && node.nextSibling()!=null) {
if(node.nextSibling()!=null) ssb.append('\n'); ssb.append('\n');
} }
} }
} }