Fix blockcode with empty lines not rendered (#1524)
This commit is contained in:
parent
c3f564605f
commit
687ad8d0f0
1 changed files with 2 additions and 2 deletions
|
@ -248,7 +248,7 @@ const HeadingRule: BlockMDRule = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const CODEBLOCK_MD_1 = '```';
|
const CODEBLOCK_MD_1 = '```';
|
||||||
const CODEBLOCK_REG_1 = /^`{3}(\S*)\n((.+\n)+)`{3} *(?!.)\n?/m;
|
const CODEBLOCK_REG_1 = /^`{3}(\S*)\n((?:.*\n)+?)`{3} *(?!.)\n?/m;
|
||||||
const CodeBlockRule: BlockMDRule = {
|
const CodeBlockRule: BlockMDRule = {
|
||||||
match: (text) => text.match(CODEBLOCK_REG_1),
|
match: (text) => text.match(CODEBLOCK_REG_1),
|
||||||
html: (match) => {
|
html: (match) => {
|
||||||
|
@ -285,7 +285,7 @@ const O_LIST_ITEM_PREFIX = /^(-|[\da-zA-Z]\.) */;
|
||||||
const O_LIST_START = /^([\d])\./;
|
const O_LIST_START = /^([\d])\./;
|
||||||
const O_LIST_TYPE = /^([aAiI])\./;
|
const O_LIST_TYPE = /^([aAiI])\./;
|
||||||
const O_LIST_TRAILING_NEWLINE = /\n$/;
|
const O_LIST_TRAILING_NEWLINE = /\n$/;
|
||||||
const ORDERED_LIST_REG_1 = /(^(-|[\da-zA-Z]\.) +.+\n?)+/m;
|
const ORDERED_LIST_REG_1 = /(^(?:-|[\da-zA-Z]\.) +.+\n?)+/m;
|
||||||
const OrderedListRule: BlockMDRule = {
|
const OrderedListRule: BlockMDRule = {
|
||||||
match: (text) => text.match(ORDERED_LIST_REG_1),
|
match: (text) => text.match(ORDERED_LIST_REG_1),
|
||||||
html: (match, parseInline) => {
|
html: (match, parseInline) => {
|
||||||
|
|
Loading…
Reference in a new issue