@@ -67,7 +67,7 @@ function parseMarkdown(text: string): Token[] {
6767 }
6868
6969 // List (ordered or unordered)
70- const listMatch = / ^ ( \s * ) ( [ - * + ] | \d + \. ) \s + ( .* ) / . exec ( line )
70+ const listMatch = / ^ ( \s * ) ( [ - * + – • ‣ ◦ ○ ⚬ ] | \d + \. ) \s + ( .* ) / . exec ( line )
7171 if ( listMatch !== null ) {
7272 if ( ! ( 1 in listMatch ) || ! ( 2 in listMatch ) ) {
7373 throw new Error ( 'Missing entries in regex matches' )
@@ -109,7 +109,7 @@ function parseMarkdown(text: string): Token[] {
109109 if ( ln . startsWith ( '```' ) ) break // code block
110110 if ( ln . startsWith ( '>' ) ) break // blockquote
111111 if ( / ^ ( # { 1 , 6 } ) \s + / . test ( ln ) ) break // heading
112- if ( / ^ ( \s * ) ( [ - * + ] | \d + \. ) \s + / . test ( ln ) ) break // list item
112+ if ( / ^ ( \s * ) ( [ - * + – • ‣ ◦ ○ ⚬ ] | \d + \. ) \s + / . test ( ln ) ) break // list item
113113
114114 paraLines . push ( ln )
115115 i ++
@@ -137,7 +137,7 @@ function parseList(lines: string[], start: number, baseIndent: number): [Token[]
137137 }
138138
139139 // This matches a new top-level bullet/number for the list
140- const match = / ^ ( \s * ) ( [ - * + ] | \d + \. ) \s + ( .* ) / . exec ( line )
140+ const match = / ^ ( \s * ) ( [ - * + – • ‣ ◦ ○ ⚬ ] | \d + \. ) \s + ( .* ) / . exec ( line )
141141 // If we don't find a bullet/number at the same indent, break out
142142 if ( match === null || ! ( 1 in match ) || match [ 1 ] . length !== baseIndent || ! ( 3 in match ) ) {
143143 break
@@ -186,7 +186,7 @@ function parseList(lines: string[], start: number, baseIndent: number): [Token[]
186186 }
187187
188188 // Check for nested list
189- const sublistMatch = / ^ ( \s * ) ( [ - * + ] | \d + \. ) \s + ( .* ) / . exec ( subline )
189+ const sublistMatch = / ^ ( \s * ) ( [ - * + – • ‣ ◦ ○ ⚬ ] | \d + \. ) \s + ( .* ) / . exec ( subline )
190190 if ( sublistMatch && 1 in sublistMatch && sublistMatch [ 1 ] . length > baseIndent && 2 in sublistMatch ) {
191191 const newBaseIndent = sublistMatch [ 1 ] . length
192192 const ordered = / ^ \d + \. / . test ( sublistMatch [ 2 ] )
0 commit comments