showdown/src/subParsers/hashBlock.js
Estevao Soares dos Santos 7d63a3e635 feat(events): add events to all subparsers
This commit adds events to all subparsers (that were previously not being watched).
2017-01-29 19:28:30 +00:00

9 lines
378 B
JavaScript

showdown.subParser('hashBlock', function (text, options, globals) {
'use strict';
text = globals.converter._dispatch('hashBlock.before', text, options, globals);
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;
});