diff --git a/lib/marked.js b/lib/marked.js index 05be0b5dfc..2b40cfaf41 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -33,7 +33,7 @@ var block = { def: /^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, table: noop, lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)+)/, + paragraph: /^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)+)/, text: /^[^\n]+/ }; diff --git a/test/unit/marked-spec.js b/test/unit/marked-spec.js index 0bb5b39f6d..97789afe09 100644 --- a/test/unit/marked-spec.js +++ b/test/unit/marked-spec.js @@ -1,11 +1,5 @@ var marked = require('../../lib/marked.js'); -it('should run the test', function () { - spyOn(marked, 'parse').and.callThrough(); - marked.parse('Hello World!'); - expect(marked.parse).toHaveBeenCalled(); -}); - describe('Test heading ID functionality', function() { it('should add id attribute by default', function() { var renderer = new marked.Renderer(marked.defaults); @@ -19,3 +13,15 @@ describe('Test heading ID functionality', function() { expect(header).toBe('