From 94cd792b9247b6208d12f9722fa4aa74ae673772 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 18 Jan 2012 09:39:19 +0100 Subject: [PATCH] Fix poor markdown parsing in tutorial-building script --- doc/tutorial/lib/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorial/lib/markdown.js b/doc/tutorial/lib/markdown.js index 4d3bfaeb77f..a5b1240fc70 100644 --- a/doc/tutorial/lib/markdown.js +++ b/doc/tutorial/lib/markdown.js @@ -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 );