diff --git a/_config.yml b/_config.yml index 574feb6..d542be6 100755 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ info: js: app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.5/js/app.js search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.5/js/search.js - volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.4/js/volantis.min.js + volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0.5/js/volantis.min.js diff --git a/source/js/volantis.js b/source/js/volantis.js index f0bd947..4856900 100644 --- a/source/js/volantis.js +++ b/source/js/volantis.js @@ -1798,9 +1798,12 @@ function() { cells: i[3] ? i[3].replace(/\n$/, "").split("\n") : [] }, s.header.length === s.align.length)) { - for (e = e.substring(i[0].length), c = 0; c < s.align.length; c++) / ^*-+:*$ / .test(s.align[c]) ? s.align[c] = "right": /^ *:-+: *$/.test(s.align[c]) ? s.align[c] = "center": /^ *:-+ *$/.test(s.align[c]) ? s.align[c] = "left": s.align[c] = null; - for (c = 0; c < s.cells.length; c++) s.cells[c] = f(s.cells[c], s.header.length); - this.tokens.push(s) + for (e = e.substring(i[0].length), + c = 0; c < s.align.length; c++) + /^ *-+: *$/.test(s.align[c]) ? s.align[c] = "right" : /^ *:-+: *$/.test(s.align[c]) ? s.align[c] = "center" : /^ *:-+ *$/.test(s.align[c]) ? s.align[c] = "left" : s.align[c] = null; + for (c = 0; c < s.cells.length; c++) + s.cells[c] = f(s.cells[c], s.header.length); + this.tokens.push(s) } else if (i = this.rules.hr.exec(e)) e = e.substring(i[0].length), this.tokens.push({ type: "hr" @@ -1861,9 +1864,12 @@ function() { cells: i[3] ? i[3].replace(/(?: *\| *)?\n$/, "").split("\n") : [] }, s.header.length === s.align.length)) { - for (e = e.substring(i[0].length), c = 0; c < s.align.length; c++) / ^*-+:*$ / .test(s.align[c]) ? s.align[c] = "right": /^ *:-+: *$/.test(s.align[c]) ? s.align[c] = "center": /^ *:-+ *$/.test(s.align[c]) ? s.align[c] = "left": s.align[c] = null; - for (c = 0; c < s.cells.length; c++) s.cells[c] = f(s.cells[c].replace(/^ *\| *| *\| *$/g, ""), s.header.length); - this.tokens.push(s) + for (e = e.substring(i[0].length), + c = 0; c < s.align.length; c++) + /^ *-+: *$/.test(s.align[c]) ? s.align[c] = "right" : /^ *:-+: *$/.test(s.align[c]) ? s.align[c] = "center" : /^ *:-+ *$/.test(s.align[c]) ? s.align[c] = "left" : s.align[c] = null; + for (c = 0; c < s.cells.length; c++) + s.cells[c] = f(s.cells[c].replace(/^ *\| *| *\| *$/g, ""), s.header.length); + this.tokens.push(s) } else if (i = this.rules.lheading.exec(e)) e = e.substring(i[0].length), this.tokens.push({ type: "heading",