mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-28 03:53:05 +07:00
2095e6ffe3
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
20 lines
542 B
JavaScript
20 lines
542 B
JavaScript
showdown.subParser('hashElement', function (text, options, globals) {
|
|
'use strict';
|
|
|
|
return function (wholeMatch, m1) {
|
|
var blockText = m1;
|
|
|
|
// Undo double lines
|
|
blockText = blockText.replace(/\n\n/g, '\n');
|
|
blockText = blockText.replace(/^\n/, '');
|
|
|
|
// strip trailing blank lines
|
|
blockText = blockText.replace(/\n+$/g, '');
|
|
|
|
// Replace the element text with a marker ("¨KxK" where x is its key)
|
|
blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n';
|
|
|
|
return blockText;
|
|
};
|
|
});
|