Browse Source

Removed tests added to spec and fixed coverage

pull/82/head
Vitaly Puzrin 10 years ago
parent
commit
1dba8be089
  1. 2
      lib/rules_block/reference.js
  2. 53
      test/fixtures/markdown-it/commonmark_extras.txt

2
lib/rules_block/reference.js

@ -146,6 +146,8 @@ module.exports = function reference(state, startLine, _endLine, silent) {
return false;
}
// Reference can not terminate anything. This check is for safety only.
/*istanbul ignore if*/
if (silent) { return true; }
label = normalizeReference(str.slice(1, labelEnd));

53
test/fixtures/markdown-it/commonmark_extras.txt

@ -1,24 +1,3 @@
Regression tests for link backtracking optimizations:
.
[[some unrelated text [link]
[link]: foo
.
<p>[[some unrelated text <a href="foo">link</a></p>
.
Link label has priority over emphasis (not covered by commonmark tests):
.
[**link]()**
**[link**]()
.
<p><a href="">**link</a>**</p>
<p>**<a href="">link**</a></p>
.
Issue #55:
.
![test]
@ -30,7 +9,7 @@ Issue #55:
.
Issue #35. `<` shoud work as punctuation
Issue #35. `<` should work as punctuation
.
an **(:**<br>
.
@ -41,13 +20,10 @@ an **(:**<br>
Should unescape only needed things in link destinations/titles:
.
[test](<\f\o\o\>\\>)
.
<p><a href="%5Cf%5Co%5Co%3E%5C">test</a></p>
.
.
[test](foo "\\\"\b\a\r")
.
<p><a href="%5Cf%5Co%5Co%3E%5C">test</a></p>
<p><a href="foo" title="\&quot;\b\a\r">test</a></p>
.
@ -60,14 +36,6 @@ Not a closing tag
.
Not a list item
.
1.list
.
<p>1.list</p>
.
Normalize link destination, but not text inside it:
.
<http://example.com/α%CE%B2γ%CE%B4>
@ -76,14 +44,6 @@ Normalize link destination, but not text inside it:
.
Autolinks do not allow escaping:
.
<http://example.com/\[\>
.
<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p>
.
Escaping entities in links:
.
[](<&quot;> "&amp;&ouml;")
@ -229,3 +189,12 @@ bar
<p>foo
bar</p>
.
.
[
test
]
.
<p>[
test
]</p>
.

Loading…
Cancel
Save