1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop, Mobile: Fixes #10891: Markdown editor: Fix toggling bulleted lists when items start with asterisks (#10902)

This commit is contained in:
Henry Heino 2024-08-22 13:52:36 -07:00 committed by GitHub
parent beff45e195
commit 78015028ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,8 +131,8 @@ export const toggleList = (listType: ListType): Command => {
// RegExps for different list types. The regular expressions MUST // RegExps for different list types. The regular expressions MUST
// be mutually exclusive. // be mutually exclusive.
// `(?!\[[ xX]+\]\s?)` means "not followed by [x] or [ ]". // `(?!\[[ xX]+\])` means "not followed by [x] or [ ]".
const bulletedRegex = /^\s*([-*])(?!\s\[[ xX]+\])\s?/; const bulletedRegex = /^\s*([-*])\s(?!\[[ xX]+\])/;
const checklistRegex = /^\s*[-*]\s\[[ xX]+\]\s?/; const checklistRegex = /^\s*[-*]\s\[[ xX]+\]\s?/;
const numberedRegex = /^\s*\d+\.\s?/; const numberedRegex = /^\s*\d+\.\s?/;