fix(tables):show raw table code in code block, and save in hashBlock

This commit is contained in:
Yanis Wang 2015-08-26 14:30:30 +08:00
parent 8efe006160
commit 776fa40831
6 changed files with 2 additions and 2 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -13,10 +13,10 @@ showdown.subParser('blockGamut', function (text, options, globals) {
text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, key);
text = text.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, key);
text = showdown.subParser('tables')(text, options, globals);
text = showdown.subParser('lists')(text, options, globals);
text = showdown.subParser('codeBlocks')(text, options, globals);
text = showdown.subParser('blockQuotes')(text, options, globals);
text = showdown.subParser('tables')(text, options, globals);
// We already ran _HashHTMLBlocks() before, in Markdown(), but that
// was to escape raw HTML in the original Markdown source. This time,

View File

@ -142,7 +142,7 @@ showdown.subParser('tables', function (text, options, globals) {
tbl.push('</tbody>');
tbl.push('</table>');
// we are done with this table and we move along
out.push(tbl.join('\n'));
out.push(showdown.subParser('hashBlock')(tbl.join('\n'), options, globals));
continue;
}
}