🗜️ build v7.0.3 [skip ci]
This commit is contained in:
parent
f3af23ec98
commit
3f865bef56
9
lib/marked.cjs
generated
9
lib/marked.cjs
generated
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* marked v7.0.2 - a markdown parser
|
* marked v7.0.3 - a markdown parser
|
||||||
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
||||||
* https://github.com/markedjs/marked
|
* https://github.com/markedjs/marked
|
||||||
*/
|
*/
|
||||||
@ -838,7 +838,8 @@ class _Tokenizer {
|
|||||||
return;
|
return;
|
||||||
const nextChar = match[1] || match[2] || '';
|
const nextChar = match[1] || match[2] || '';
|
||||||
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
||||||
const lLength = match[0].length - 1;
|
// unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)
|
||||||
|
const lLength = [...match[0]].length - 1;
|
||||||
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
||||||
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
||||||
endReg.lastIndex = 0;
|
endReg.lastIndex = 0;
|
||||||
@ -848,7 +849,7 @@ class _Tokenizer {
|
|||||||
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
||||||
if (!rDelim)
|
if (!rDelim)
|
||||||
continue; // skip single * in __abc*abc__
|
continue; // skip single * in __abc*abc__
|
||||||
rLength = rDelim.length;
|
rLength = [...rDelim].length;
|
||||||
if (match[3] || match[4]) { // found another Left Delim
|
if (match[3] || match[4]) { // found another Left Delim
|
||||||
delimTotal += rLength;
|
delimTotal += rLength;
|
||||||
continue;
|
continue;
|
||||||
@ -864,7 +865,7 @@ class _Tokenizer {
|
|||||||
continue; // Haven't found enough closing delimiters
|
continue; // Haven't found enough closing delimiters
|
||||||
// Remove extra characters. *a*** -> *a*
|
// Remove extra characters. *a*** -> *a*
|
||||||
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
||||||
const raw = src.slice(0, lLength + match.index + rLength + 1);
|
const raw = [...src].slice(0, lLength + match.index + rLength + 1).join('');
|
||||||
// Create `em` if smallest delimiter has odd char count. *a***
|
// Create `em` if smallest delimiter has odd char count. *a***
|
||||||
if (Math.min(lLength, rLength) % 2) {
|
if (Math.min(lLength, rLength) % 2) {
|
||||||
const text = raw.slice(1, -1);
|
const text = raw.slice(1, -1);
|
||||||
|
2
lib/marked.cjs.map
generated
2
lib/marked.cjs.map
generated
File diff suppressed because one or more lines are too long
9
lib/marked.esm.js
generated
9
lib/marked.esm.js
generated
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* marked v7.0.2 - a markdown parser
|
* marked v7.0.3 - a markdown parser
|
||||||
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
||||||
* https://github.com/markedjs/marked
|
* https://github.com/markedjs/marked
|
||||||
*/
|
*/
|
||||||
@ -836,7 +836,8 @@ class _Tokenizer {
|
|||||||
return;
|
return;
|
||||||
const nextChar = match[1] || match[2] || '';
|
const nextChar = match[1] || match[2] || '';
|
||||||
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
||||||
const lLength = match[0].length - 1;
|
// unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)
|
||||||
|
const lLength = [...match[0]].length - 1;
|
||||||
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
||||||
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
||||||
endReg.lastIndex = 0;
|
endReg.lastIndex = 0;
|
||||||
@ -846,7 +847,7 @@ class _Tokenizer {
|
|||||||
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
||||||
if (!rDelim)
|
if (!rDelim)
|
||||||
continue; // skip single * in __abc*abc__
|
continue; // skip single * in __abc*abc__
|
||||||
rLength = rDelim.length;
|
rLength = [...rDelim].length;
|
||||||
if (match[3] || match[4]) { // found another Left Delim
|
if (match[3] || match[4]) { // found another Left Delim
|
||||||
delimTotal += rLength;
|
delimTotal += rLength;
|
||||||
continue;
|
continue;
|
||||||
@ -862,7 +863,7 @@ class _Tokenizer {
|
|||||||
continue; // Haven't found enough closing delimiters
|
continue; // Haven't found enough closing delimiters
|
||||||
// Remove extra characters. *a*** -> *a*
|
// Remove extra characters. *a*** -> *a*
|
||||||
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
||||||
const raw = src.slice(0, lLength + match.index + rLength + 1);
|
const raw = [...src].slice(0, lLength + match.index + rLength + 1).join('');
|
||||||
// Create `em` if smallest delimiter has odd char count. *a***
|
// Create `em` if smallest delimiter has odd char count. *a***
|
||||||
if (Math.min(lLength, rLength) % 2) {
|
if (Math.min(lLength, rLength) % 2) {
|
||||||
const text = raw.slice(1, -1);
|
const text = raw.slice(1, -1);
|
||||||
|
2
lib/marked.esm.js.map
generated
2
lib/marked.esm.js.map
generated
File diff suppressed because one or more lines are too long
9
lib/marked.umd.js
generated
9
lib/marked.umd.js
generated
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* marked v7.0.2 - a markdown parser
|
* marked v7.0.3 - a markdown parser
|
||||||
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
||||||
* https://github.com/markedjs/marked
|
* https://github.com/markedjs/marked
|
||||||
*/
|
*/
|
||||||
@ -842,7 +842,8 @@
|
|||||||
return;
|
return;
|
||||||
const nextChar = match[1] || match[2] || '';
|
const nextChar = match[1] || match[2] || '';
|
||||||
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
||||||
const lLength = match[0].length - 1;
|
// unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)
|
||||||
|
const lLength = [...match[0]].length - 1;
|
||||||
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
||||||
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
||||||
endReg.lastIndex = 0;
|
endReg.lastIndex = 0;
|
||||||
@ -852,7 +853,7 @@
|
|||||||
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
||||||
if (!rDelim)
|
if (!rDelim)
|
||||||
continue; // skip single * in __abc*abc__
|
continue; // skip single * in __abc*abc__
|
||||||
rLength = rDelim.length;
|
rLength = [...rDelim].length;
|
||||||
if (match[3] || match[4]) { // found another Left Delim
|
if (match[3] || match[4]) { // found another Left Delim
|
||||||
delimTotal += rLength;
|
delimTotal += rLength;
|
||||||
continue;
|
continue;
|
||||||
@ -868,7 +869,7 @@
|
|||||||
continue; // Haven't found enough closing delimiters
|
continue; // Haven't found enough closing delimiters
|
||||||
// Remove extra characters. *a*** -> *a*
|
// Remove extra characters. *a*** -> *a*
|
||||||
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
||||||
const raw = src.slice(0, lLength + match.index + rLength + 1);
|
const raw = [...src].slice(0, lLength + match.index + rLength + 1).join('');
|
||||||
// Create `em` if smallest delimiter has odd char count. *a***
|
// Create `em` if smallest delimiter has odd char count. *a***
|
||||||
if (Math.min(lLength, rLength) % 2) {
|
if (Math.min(lLength, rLength) % 2) {
|
||||||
const text = raw.slice(1, -1);
|
const text = raw.slice(1, -1);
|
||||||
|
2
lib/marked.umd.js.map
generated
2
lib/marked.umd.js.map
generated
File diff suppressed because one or more lines are too long
4
marked.min.js
generated
vendored
4
marked.min.js
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user