mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(tables):show raw table code in code block, and save in hashBlock
This commit is contained in:
parent
8efe006160
commit
776fa40831
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -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 = 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('lists')(text, options, globals);
|
||||||
text = showdown.subParser('codeBlocks')(text, options, globals);
|
text = showdown.subParser('codeBlocks')(text, options, globals);
|
||||||
text = showdown.subParser('blockQuotes')(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
|
// We already ran _HashHTMLBlocks() before, in Markdown(), but that
|
||||||
// was to escape raw HTML in the original Markdown source. This time,
|
// was to escape raw HTML in the original Markdown source. This time,
|
||||||
|
|
|
@ -142,7 +142,7 @@ showdown.subParser('tables', function (text, options, globals) {
|
||||||
tbl.push('</tbody>');
|
tbl.push('</tbody>');
|
||||||
tbl.push('</table>');
|
tbl.push('</table>');
|
||||||
// we are done with this table and we move along
|
// 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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user