Skip to content

Commit

Permalink
Merge pull request #1438 from UziTech/html-new-line-fix
Browse files Browse the repository at this point in the history
allow html without \n after
  • Loading branch information
joshbruce authored Mar 25, 2019
2 parents 6eec528 + 42e816c commit d94253c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var block = {
+ '|<![A-Z][\\s\\S]*?>\\n*' // (4)
+ '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*' // (5)
+ '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6)
+ '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag
+ '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag
+ '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag
+ '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag
+ ')',
def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
table: noop,
Expand Down
1 change: 1 addition & 0 deletions test/new/html_no_new_line.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src='sdfg'>
1 change: 1 addition & 0 deletions test/new/html_no_new_line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src='sdfg'>

0 comments on commit d94253c

Please sign in to comment.