SimpleChatTCRV:Markdown:OrderedUnOrdered: rename to semantic
This commit is contained in:
parent
908ca170fa
commit
e7b8fc1392
|
|
@ -56,22 +56,24 @@ export class MarkDown {
|
||||||
if (matchUnOrdered != null) {
|
if (matchUnOrdered != null) {
|
||||||
let sList = 'none'
|
let sList = 'none'
|
||||||
let listLvl = 0
|
let listLvl = 0
|
||||||
|
let curOffset = matchUnOrdered[1].length
|
||||||
if (this.in.list.offsets.length == 0) {
|
if (this.in.list.offsets.length == 0) {
|
||||||
sList = 'same'
|
sList = 'same'
|
||||||
this.in.list.offsets.push(matchUnOrdered[1].length)
|
this.in.list.offsets.push(curOffset)
|
||||||
listLvl = this.in.list.offsets.length // ie 1
|
listLvl = this.in.list.offsets.length // ie 1
|
||||||
this.html += "<ul>\n"
|
this.html += "<ul>\n"
|
||||||
} else {
|
} else {
|
||||||
if (this.in.list.offsets[this.in.list.offsets.length-1] < matchUnOrdered[1].length){
|
let lastOffset = this.in.list.offsets[this.in.list.offsets.length-1];
|
||||||
|
if (lastOffset < curOffset){
|
||||||
sList = 'same'
|
sList = 'same'
|
||||||
this.in.list.offsets.push(matchUnOrdered[1].length)
|
this.in.list.offsets.push(curOffset)
|
||||||
listLvl = this.in.list.offsets.length
|
listLvl = this.in.list.offsets.length
|
||||||
this.html += "<ul>\n"
|
this.html += "<ul>\n"
|
||||||
} else if (this.in.list.offsets[this.in.list.offsets.length-1] == matchUnOrdered[1].length){
|
} else if (lastOffset == curOffset){
|
||||||
sList = 'same'
|
sList = 'same'
|
||||||
} else {
|
} else {
|
||||||
sList = 'same'
|
sList = 'same'
|
||||||
while (this.in.list.offsets[this.in.list.offsets.length-1] > matchUnOrdered[1].length) {
|
while (lastOffset > curOffset) {
|
||||||
this.in.list.offsets.pop()
|
this.in.list.offsets.pop()
|
||||||
this.html += `</ul>\n`
|
this.html += `</ul>\n`
|
||||||
if (this.in.list.offsets.length == 0) {
|
if (this.in.list.offsets.length == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue