🗜️ build [skip ci]

This commit is contained in:
MarkedJS bot 2022-06-13 03:16:22 +00:00
parent 15f3f157de
commit 212707e187
4 changed files with 36 additions and 3 deletions

View File

@ -621,7 +621,8 @@ var Tokenizer = /*#__PURE__*/function () {
if (!endEarly) { if (!endEarly) {
var nextBulletRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"); var nextBulletRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))");
var hrRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"); // Check if following lines should be included in List Item var hrRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");
var fencesBeginRegex = new RegExp("^( {0," + Math.min(3, indent - 1) + "})(```|~~~)"); // Check if following lines should be included in List Item
while (src) { while (src) {
rawLine = src.split('\n', 1)[0]; rawLine = src.split('\n', 1)[0];
@ -629,6 +630,16 @@ var Tokenizer = /*#__PURE__*/function () {
if (this.options.pedantic) { if (this.options.pedantic) {
line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' '); line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');
} // End list item if found code fences
if (fencesBeginRegex.test(line)) {
break;
} // End list item if found start of new heading
if (this.rules.block.heading.test(line)) {
break;
} // End list item if found start of new bullet } // End list item if found start of new bullet

View File

@ -536,6 +536,7 @@ class Tokenizer {
if (!endEarly) { if (!endEarly) {
const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`); const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`);
const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`); const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);
const fencesBeginRegex = new RegExp(`^( {0,${Math.min(3, indent - 1)}})(\`\`\`|~~~)`);
// Check if following lines should be included in List Item // Check if following lines should be included in List Item
while (src) { while (src) {
@ -547,6 +548,16 @@ class Tokenizer {
line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' '); line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');
} }
// End list item if found code fences
if (fencesBeginRegex.test(line)) {
break;
}
// End list item if found start of new heading
if (this.rules.block.heading.test(line)) {
break;
}
// End list item if found start of new bullet // End list item if found start of new bullet
if (nextBulletRegex.test(line)) { if (nextBulletRegex.test(line)) {
break; break;

View File

@ -623,7 +623,8 @@
if (!endEarly) { if (!endEarly) {
var nextBulletRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"); var nextBulletRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))");
var hrRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"); // Check if following lines should be included in List Item var hrRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");
var fencesBeginRegex = new RegExp("^( {0," + Math.min(3, indent - 1) + "})(```|~~~)"); // Check if following lines should be included in List Item
while (src) { while (src) {
rawLine = src.split('\n', 1)[0]; rawLine = src.split('\n', 1)[0];
@ -631,6 +632,16 @@
if (this.options.pedantic) { if (this.options.pedantic) {
line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' '); line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');
} // End list item if found code fences
if (fencesBeginRegex.test(line)) {
break;
} // End list item if found start of new heading
if (this.rules.block.heading.test(line)) {
break;
} // End list item if found start of new bullet } // End list item if found start of new bullet

2
marked.min.js vendored

File diff suppressed because one or more lines are too long