Commit 661b7fb2 authored by Thomas's avatar Thomas
Browse files

- Fix issue #961 - Quotes broken with Markdowns

parent 1a0131e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ public class MarkdownConverter {
    public List<MarkdownItem> markdownItems;

    public MarkdownItem getByPosition(int position) {
        if (markdownItems != null && markdownItems.size() > 0 && position < markdownItems.size()) {
        if (markdownItems != null && !markdownItems.isEmpty() && position < markdownItems.size()) {
            for (MarkdownItem markdownItem : markdownItems) {
                if (markdownItem.position == position) {
                    return markdownItem;
+4 −2
Original line number Diff line number Diff line
@@ -148,7 +148,9 @@ public class SpannableHelper {
        if (status != null && status.mentions != null) {
            mentions.addAll(status.mentions);
        }
        if(!convertMarkdown) {
            text = text.replaceAll("((<\\s?p\\s?>|<\\s?br\\s?/?>)&gt;(((?!(<\\s?br\\s?/?>|<\\s?/s?p\\s?>)).)*))", "$2<blockquote>$3</blockquote>");
        }
        text = text.trim().replaceAll("\\s{3}", "&nbsp;&nbsp;&nbsp;");
        text = text.trim().replaceAll("\\s{2}", "&nbsp;&nbsp;");
        SpannableString initialContent;
@@ -181,7 +183,7 @@ public class SpannableHelper {
                    markdownItem.urlSpan = spans[0];
                }

                if (markdownItem.code.trim().length() > 0) {
                if (!markdownItem.code.trim().isEmpty()) {
                    markdownConverter.markdownItems.add(markdownItem);
                    position++;
                }