Skip to content

Commit 5736014

Browse files
committed
address review comment: equivalence of [^\n] and .
1 parent 990b452 commit 5736014

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/marked.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var block = {
1717
fences: noop,
1818
hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,
1919
// cap[2] might be ' HEADING # ' and must be trimmed appropriately.
20-
heading: /^ *(#{1,6})([^\n]*)(?:\n+|$)/,
20+
heading: /^ *(#{1,6})(.*)(?:\n+|$)/,
2121
nptable: noop,
2222
blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
2323
list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
@@ -95,7 +95,7 @@ block.gfm = merge({}, block.normal, {
9595
fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,
9696
paragraph: /^/,
9797
// cap[2] might be ' HEADING # ' and must be trimmed appropriately.
98-
heading: /^ *(#{1,6}) ([^\n]+)(?:\n+|$)/
98+
heading: /^ *(#{1,6}) (.+)(?:\n+|$)/
9999
});
100100

101101
block.gfm.paragraph = edit(block.paragraph)

0 commit comments

Comments
 (0)