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) {
|
process_list_unordered(line) {
|
||||||
// spaces followed by - or + or * followed by a space and actual list item
|
// 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) {
|
if (matchUnOrdered != null) {
|
||||||
let sList = 'none'
|
let sList = 'none'
|
||||||
let listLvl = 0
|
let listLvl = 0
|
||||||
|
|
@ -79,7 +79,7 @@ export class MarkDown {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sList == 'same') {
|
if (sList == 'same') {
|
||||||
this.html += `<li>${matchUnOrdered[2]}</li>\n`
|
this.html += `<li>${matchUnOrdered[3]}</li>\n`
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue