diff --git a/lib/marked.js b/lib/marked.js index 81c482d41c7..ca608845b50 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -135,7 +135,7 @@ block.pedantic = merge({}, block.normal, { function Lexer(options) { this.tokens = []; - this.tokens.links = {}; + this.tokens.links = Object.create(null); this.options = options || marked.defaults; this.rules = block.normal; diff --git a/test/specs/marked/marked-spec.js b/test/specs/marked/marked-spec.js index 5d4d32e91c7..bec0b6c88a4 100644 --- a/test/specs/marked/marked-spec.js +++ b/test/specs/marked/marked-spec.js @@ -47,6 +47,20 @@ describe('Marked Code spans', function() { }); }); +describe('Marked Links', function() { + var section = 'Links'; + + var shouldPassButFails = []; + + var willNotBeAttemptedByCoreTeam = []; + + var ignore = shouldPassButFails.concat(willNotBeAttemptedByCoreTeam); + + markedSpec.forEach(function(spec) { + messenger.test(spec, section, ignore); + }); +}); + describe('Marked Table cells', function() { var section = 'Table cells'; diff --git a/test/specs/marked/marked.json b/test/specs/marked/marked.json index 60c2023827f..3153756383b 100644 --- a/test/specs/marked/marked.json +++ b/test/specs/marked/marked.json @@ -5,6 +5,12 @@ "html": "
someone@example.com
Link: constructor.
", + "example": 10 + }, { "section": "Table cells", "markdown": "|1|\n|-|\n|1|",