We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a75e77b commit e2ded04Copy full SHA for e2ded04
app/src/main/java/it/niedermann/owncloud/notes/util/NoteUtil.java
@@ -17,7 +17,21 @@ public class NoteUtil {
17
* @return Spannable
18
*/
19
public static CharSequence parseMarkDown(String s) {
20
- return bypass.markdownToSpannable(s);
+ /*
21
+ * Appends two spaces at the end of every line to force a line break.
22
+ *
23
+ * @see #24
24
+ */
25
+ StringBuilder sb = new StringBuilder();
26
+ for (String line : s.split("\n")) {
27
+ sb.append(line);
28
+ // If line is not a list item
29
+ if (!line.trim().matches("^([\\-*]|[0-9]+\\.)(.)*")) {
30
+ sb.append(" ");
31
+ }
32
+ sb.append("\n");
33
34
+ return bypass.markdownToSpannable(sb.toString());
35
}
36
37
/**
0 commit comments