mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-21 20:35:58 +03:00
Fix #1205 Also remove markdown from title when the note only has one line
Includes a few more unit tests for this method
This commit is contained in:
parent
303f335fac
commit
3bf57cd285
3 changed files with 6 additions and 2 deletions
|
@ -117,7 +117,7 @@ public class NoteUtil {
|
|||
line = removeMarkdown(lines[currentLine]);
|
||||
}
|
||||
} else {
|
||||
line = content;
|
||||
line = removeMarkdown(content);
|
||||
}
|
||||
return line;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ public class NoteUtilTest extends TestCase {
|
|||
assertEquals("Test", NoteUtil.getLineWithoutMarkdown("\nTest", 0));
|
||||
assertEquals("Foo", NoteUtil.getLineWithoutMarkdown("Foo\nBar", 0));
|
||||
assertEquals("Bar", NoteUtil.getLineWithoutMarkdown("Foo\nBar", 1));
|
||||
assertEquals("Foo", NoteUtil.getLineWithoutMarkdown("* Foo\n* Bar", 0));
|
||||
assertEquals("Bar", NoteUtil.getLineWithoutMarkdown("- Foo\nBar", 1));
|
||||
assertEquals("Foo", NoteUtil.getLineWithoutMarkdown("# Foo", 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
- ⚙️ Enhancing toggling of existing punctuation in the editor (#1193) - by @Jimmy-7664
|
||||
- ⚙️ Enhancing toggling of existing punctuation in the editor (#1193) - by @Jimmy-7664
|
||||
- 🐞 Also remove markdown from title when the note only has one line (#1205)
|
Loading…
Reference in a new issue