fix {|} separator in the presence of alignments. fixes #146.
This commit is contained in:
parent
36d94d41a6
commit
9f1552c687
|
@ -557,6 +557,7 @@ Element.prototype._parseAttr = function(lines) {
|
||||||
|
|
||||||
Element.prototype._align = function(line, width, align) {
|
Element.prototype._align = function(line, width, align) {
|
||||||
if (!align) return line;
|
if (!align) return line;
|
||||||
|
//if (!align && !~line.indexOf('{|}')) return line;
|
||||||
|
|
||||||
var cline = line.replace(/\x1b\[[\d;]*m/g, '')
|
var cline = line.replace(/\x1b\[[\d;]*m/g, '')
|
||||||
, len = cline.length
|
, len = cline.length
|
||||||
|
@ -635,7 +636,8 @@ main:
|
||||||
}
|
}
|
||||||
if (cap = /{\/(left|center|right)}$/.exec(line)) {
|
if (cap = /{\/(left|center|right)}$/.exec(line)) {
|
||||||
line = line.slice(0, -cap[0].length);
|
line = line.slice(0, -cap[0].length);
|
||||||
state = null;
|
//state = null;
|
||||||
|
state = this.align;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue