Added test for markdown bug with linking [ul] and [poll]

This commit is contained in:
Robin Ward 2014-12-31 11:44:56 -05:00
parent 3d42c2d515
commit 36f53790f4
2 changed files with 7 additions and 4 deletions

View file

@ -150,6 +150,10 @@ test("Links", function() {
cooked("[Link](http://www.example.com) (with an outer \"description\")",
"<p><a href=\"http://www.example.com\">Link</a> (with an outer \"description\")</p>",
"it doesn't consume closing parens as part of the url");
cooked("[ul][1]\n\n[1]: http://eviltrout.com",
"<p><a href=\"http://eviltrout.com\">ul</a></p>",
"it can use `ul` as a link name");
});
test("simple quotes", function() {

View file

@ -1186,15 +1186,14 @@
this,
text.substr( m.index ), m, previous_nodes || [] );
if(!res){
// fallback
// If no inline code executed, fallback
if (!res) {
var fn = this.dialect.inline[m[1][0]];
if(fn) {
if (fn) {
res = fn.call(
this,
text.substr( m.index ), m, previous_nodes || [] );
}
}
}
// Default for now to make dev easier. just slurp special and output it.