Fix poor markdown parsing in tutorial-building script

This commit is contained in:
Marijn Haverbeke 2012-01-18 09:39:19 +01:00
parent 2d85e8f59a
commit 94cd792b92
1 changed files with 1 additions and 1 deletions

View File

@ -820,7 +820,7 @@ Markdown.dialects.Gruber.inline = {
// 1 2 3 4 <--- captures
var m = text.match( /^\[([\s\S]*?)\][ \t]*\([ \t]*(\S+)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/ );
if ( m ) {
if ( m && m[1].indexOf("]") == -1 ) {
if ( m[2] && m[2][0] == '<' && m[2][m[2].length-1] == '>' )
m[2] = m[2].substring( 1, m[2].length - 1 );