Skip to content

Commit

Permalink
Merge pull request #196 from eviltrout/no_closing_fix
Browse files Browse the repository at this point in the history
FIX: Invalid output when missing the closing paren.
  • Loading branch information
ashb committed May 8, 2014
2 parents 6e9c2eb + 098acff commit b6d50d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/dialects/gruber.js
Expand Up @@ -609,8 +609,7 @@ define(['../markdown_helpers', './dialect_helpers', '../parser'], function (Mark

// No closing ']' found. Just consume the [
if ( !res[1] ) {
var size = res[0] + 1;
return [ size, text.charAt(0) + res[2].join('') ];
return [ res[0] + 1, text.charAt(0) ].concat(res[2]);
}

var consumed = 1 + res[ 0 ],
Expand Down
5 changes: 5 additions & 0 deletions test/features/links/no_closing.json
@@ -0,0 +1,5 @@
["html",
["p",
"[[1]"
]
]
1 change: 1 addition & 0 deletions test/features/links/no_closing.text
@@ -0,0 +1 @@
[[1]

0 comments on commit b6d50d2

Please sign in to comment.