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

pull/10922/head
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
1 changed files with 2 additions and 2 deletions

View File

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