|
@@ -4156,14 +4156,16 @@ showdown.subParser('tables', function (text, options, globals) {
|
|
|
function parseTable (rawTable) {
|
|
|
var i, tableLines = rawTable.split('\n');
|
|
|
|
|
|
- // strip wrong first and last column if wrapped tables are used
|
|
|
for (i = 0; i < tableLines.length; ++i) {
|
|
|
+ // strip wrong first and last column if wrapped tables are used
|
|
|
if (/^ {0,3}\|/.test(tableLines[i])) {
|
|
|
tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, '');
|
|
|
}
|
|
|
if (/\|[ \t]*$/.test(tableLines[i])) {
|
|
|
tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, '');
|
|
|
}
|
|
|
+ // parse code spans first, but we only support one line code spans
|
|
|
+ tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);
|
|
|
}
|
|
|
|
|
|
var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),
|