SimpleChatTCRV:Markdown:Ordered and Unordered
Update regex to match both ordered and unordered list
This commit is contained in:
parent
a1dc72ba66
commit
9453a81b95
|
|
@ -50,7 +50,7 @@ export class MarkDown {
|
|||
*/
|
||||
process_list_unordered(line) {
|
||||
// spaces followed by - or + or * followed by a space and actual list item
|
||||
let matchUnOrdered = line.match(/^([ ]*)[-+*][ ](.*)$/);
|
||||
let matchUnOrdered = line.match(/^([ ]*)([-+*]|[a-zA-Z0-9]\.)[ ](.*)$/);
|
||||
if (matchUnOrdered != null) {
|
||||
let sList = 'none'
|
||||
let listLvl = 0
|
||||
|
|
@ -79,7 +79,7 @@ export class MarkDown {
|
|||
}
|
||||
}
|
||||
if (sList == 'same') {
|
||||
this.html += `<li>${matchUnOrdered[2]}</li>\n`
|
||||
this.html += `<li>${matchUnOrdered[3]}</li>\n`
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue