1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-04-11 11:12:03 +02:00

Electron: Fixes #653: Don't detect horizontal rule as bullet list item

This commit is contained in:
Laurent Cozic 2018-06-30 16:15:44 +01:00
parent d5d0732bf3
commit 6754d4ee89

View File

@ -648,7 +648,7 @@ class NoteTextComponent extends React.Component {
if (lineNoLeftSpaces.indexOf('- [ ] ') === 0 || lineNoLeftSpaces.indexOf('- [x] ') === 0 || lineNoLeftSpaces.indexOf('- [X] ') === 0) return leftSpaces + '- [ ] ';
if (lineNoLeftSpaces.indexOf('- ') === 0) return leftSpaces + '- ';
if (lineNoLeftSpaces.indexOf('* ') === 0) return leftSpaces + '* ';
if (lineNoLeftSpaces.indexOf('* ') === 0 && line.trim() !== '* * *') return leftSpaces + '* ';
const bulletNumber = markdownUtils.olLineNumber(lineNoLeftSpaces);
if (bulletNumber) return leftSpaces + (bulletNumber + 1) + '. ';