From 04187d8fae2ce004756f38adc0daecbdeedbc941 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 5 Aug 2019 12:37:05 -0500 Subject: [PATCH 1/2] remove substitutions --- lib/marked.js | 4 +--- test/specs/commonmark/commonmark.0.29.json | 3 +-- test/specs/gfm/commonmark.0.29.json | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 49a4153a4b..c156309ccf 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -169,9 +169,7 @@ Lexer.lex = function(src, options) { Lexer.prototype.lex = function(src) { src = src .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); + .replace(/\t/g, ' '); return this.token(src, true); }; diff --git a/test/specs/commonmark/commonmark.0.29.json b/test/specs/commonmark/commonmark.0.29.json index 1d3071112b..bbe9640a07 100644 --- a/test/specs/commonmark/commonmark.0.29.json +++ b/test/specs/commonmark/commonmark.0.29.json @@ -2863,8 +2863,7 @@ "example": 353, "start_line": 6322, "end_line": 6326, - "section": "Emphasis and strong emphasis", - "shouldFail": true + "section": "Emphasis and strong emphasis" }, { "markdown": "foo*bar*\n", diff --git a/test/specs/gfm/commonmark.0.29.json b/test/specs/gfm/commonmark.0.29.json index eb0b005b4b..d2b21484c1 100644 --- a/test/specs/gfm/commonmark.0.29.json +++ b/test/specs/gfm/commonmark.0.29.json @@ -2863,8 +2863,7 @@ "example": 353, "start_line": 6322, "end_line": 6326, - "section": "Emphasis and strong emphasis", - "shouldFail": true + "section": "Emphasis and strong emphasis" }, { "markdown": "foo*bar*\n", From f2de291b6a884e6e99fdbd593cfd5c94cf7c1a8f Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 5 Aug 2019 12:52:36 -0500 Subject: [PATCH 2/2] add substitution test --- test/specs/new/substitutions.html | 3 +++ test/specs/new/substitutions.md | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 test/specs/new/substitutions.html create mode 100644 test/specs/new/substitutions.md diff --git a/test/specs/new/substitutions.html b/test/specs/new/substitutions.html new file mode 100644 index 0000000000..94333801e9 --- /dev/null +++ b/test/specs/new/substitutions.html @@ -0,0 +1,3 @@ +

foo␤␤bar

+ +

* a *

diff --git a/test/specs/new/substitutions.md b/test/specs/new/substitutions.md new file mode 100644 index 0000000000..e252ae1875 --- /dev/null +++ b/test/specs/new/substitutions.md @@ -0,0 +1,3 @@ +foo␤␤bar + +* a *