summaryrefslogtreecommitdiffstats
path: root/packages/markdown/marked
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-03-14 12:03:34 +0200
committerLauri Ojansivu <x@xet7.org>2020-03-14 12:03:34 +0200
commit6e0fa78022ea487176eb0a32ec5a4a441f8e0c3c (patch)
tree8c8aeb11ceea98e632bbf4d460f1101df60ca1ce /packages/markdown/marked
parent06fb201d808e08280fd56b686c6f8a7f8e09e561 (diff)
downloadwekan-6e0fa78022ea487176eb0a32ec5a4a441f8e0c3c.tar.gz
wekan-6e0fa78022ea487176eb0a32ec5a4a441f8e0c3c.tar.bz2
wekan-6e0fa78022ea487176eb0a32ec5a4a441f8e0c3c.zip
Update markdown.
Diffstat (limited to 'packages/markdown/marked')
-rw-r--r--packages/markdown/marked/lib/marked.esm.js18
-rw-r--r--packages/markdown/marked/lib/marked.js10
-rw-r--r--packages/markdown/marked/package-lock.json6
3 files changed, 27 insertions, 7 deletions
diff --git a/packages/markdown/marked/lib/marked.esm.js b/packages/markdown/marked/lib/marked.esm.js
index 36672909..8a42d378 100644
--- a/packages/markdown/marked/lib/marked.esm.js
+++ b/packages/markdown/marked/lib/marked.esm.js
@@ -364,7 +364,7 @@ block.html = edit$1(block.html, 'i')
block.paragraph = edit$1(block._paragraph)
.replace('hr', block.hr)
- .replace('heading', ' {0,3}#{1,6} +')
+ .replace('heading', ' {0,3}#{1,6} ')
.replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
.replace('blockquote', ' {0,3}>')
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
@@ -389,9 +389,23 @@ block.normal = merge$1({}, block);
block.gfm = merge$1({}, block.normal, {
nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
- table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
+ table: '^ *\\|(.+)\\n' // Header
+ + ' *\\|?( *[-:]+[-| :]*)' // Align
+ + '(?:\\n((?:(?!^|>|\\n| |hr|heading|lheading|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
});
+block.gfm.table = edit$1(block.gfm.table)
+ .replace('hr', block.hr)
+ .replace('heading', ' {0,3}#{1,6} ')
+ .replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)')
+ .replace('blockquote', ' {0,3}>')
+ .replace('code', ' {4}[^\\n]')
+ .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
+ .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
+ .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)')
+ .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
+ .getRegex();
+
/**
* Pedantic grammar (original John Gruber's loose markdown specification)
*/
diff --git a/packages/markdown/marked/lib/marked.js b/packages/markdown/marked/lib/marked.js
index 874dcd4d..b40a29da 100644
--- a/packages/markdown/marked/lib/marked.js
+++ b/packages/markdown/marked/lib/marked.js
@@ -386,7 +386,7 @@
block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';
block._comment = /<!--(?!-?>)[\s\S]*?-->/;
block.html = edit$1(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
- block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} +').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
+ block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
.replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
.getRegex();
@@ -402,8 +402,14 @@
block.gfm = merge$1({}, block.normal, {
nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
- table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
+ table: '^ *\\|(.+)\\n' // Header
+ + ' *\\|?( *[-:]+[-| :]*)' // Align
+ + '(?:\\n((?:(?!^|>|\\n| |hr|heading|lheading|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+
});
+ block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('lheading', '([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
+ .replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
+ .getRegex();
/**
* Pedantic grammar (original John Gruber's loose markdown specification)
*/
diff --git a/packages/markdown/marked/package-lock.json b/packages/markdown/marked/package-lock.json
index 31e4191c..be09b8f2 100644
--- a/packages/markdown/marked/package-lock.json
+++ b/packages/markdown/marked/package-lock.json
@@ -1195,9 +1195,9 @@
"dev": true
},
"acorn": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
- "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
+ "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-jsx": {