mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Merge branch 'hotfix/double_tables' into develop
This commit is contained in:
commit
c210613812
|
@ -55,12 +55,13 @@
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
filter = function(text) {
|
filter = function(text) {
|
||||||
var i=0, lines = text.split('\n'), tbl = [], line, hs, rows, out = [];
|
var i=0, lines = text.split('\n'), line, hs, rows, out = [];
|
||||||
for (i; i<lines.length;i+=1) {
|
for (i; i<lines.length;i+=1) {
|
||||||
line = lines[i];
|
line = lines[i];
|
||||||
// looks like a table heading
|
// looks like a table heading
|
||||||
if (line.trim().match(/^[|]{1}.*[|]{1}$/)) {
|
if (line.trim().match(/^[|]{1}.*[|]{1}$/)) {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
|
var tbl = [];
|
||||||
tbl.push('<table>');
|
tbl.push('<table>');
|
||||||
hs = line.substring(1, line.length -1).split('|');
|
hs = line.substring(1, line.length -1).split('|');
|
||||||
tbl.push(tables.thead.apply(this, hs));
|
tbl.push(tables.thead.apply(this, hs));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user