mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-05-06 17:30:35 +07:00
Add markdown format support (#25)
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
This commit is contained in:
32
node_modules/showdown/src/subParsers/blockGamut.js
generated
vendored
Normal file
32
node_modules/showdown/src/subParsers/blockGamut.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* These are all the transformations that form block-level
|
||||
* tags like paragraphs, headers, and list items.
|
||||
*/
|
||||
showdown.subParser('blockGamut', function (text, options, globals) {
|
||||
'use strict';
|
||||
|
||||
text = globals.converter._dispatch('blockGamut.before', text, options, globals);
|
||||
|
||||
// we parse blockquotes first so that we can have headings and hrs
|
||||
// inside blockquotes
|
||||
text = showdown.subParser('blockQuotes')(text, options, globals);
|
||||
text = showdown.subParser('headers')(text, options, globals);
|
||||
|
||||
// Do Horizontal Rules:
|
||||
text = showdown.subParser('horizontalRule')(text, options, globals);
|
||||
|
||||
text = showdown.subParser('lists')(text, options, globals);
|
||||
text = showdown.subParser('codeBlocks')(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,
|
||||
// we're escaping the markup we've just created, so that we don't wrap
|
||||
// <p> tags around block-level tags.
|
||||
text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
|
||||
text = showdown.subParser('paragraphs')(text, options, globals);
|
||||
|
||||
text = globals.converter._dispatch('blockGamut.after', text, options, globals);
|
||||
|
||||
return text;
|
||||
});
|
||||
Reference in New Issue
Block a user