showdown/src/subParsers/hashBlock.js

9 lines
378 B
JavaScript
Raw Normal View History

2015-01-16 05:21:33 +08:00
showdown.subParser('hashBlock', function (text, options, globals) {
2015-01-19 19:37:21 +08:00
'use strict';
text = globals.converter._dispatch('hashBlock.before', text, options, globals);
2015-01-19 19:37:21 +08:00
text = text.replace(/(^\n+|\n+$)/g, '');
text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n';
text = globals.converter._dispatch('hashBlock.after', text, options, globals);
return text;
2015-01-16 05:21:33 +08:00
});