[issue #64] Fixed bug with links in markdown.

This commit is contained in:
George Vinogradov 2012-01-28 05:41:28 +04:00
parent a89db6f3a5
commit 7974893e01
1 changed files with 6 additions and 4 deletions

View File

@ -91,8 +91,10 @@ var MarkDown = {
OK: function( res ) {
var rep = '';
if ( res['text'] && res['href'] ) {
rep = '[' + res['text'] + ']('
+ res['href'] + ')';
rep = '[[' + res['text'] + '|'
+ res['href'] + ']]';
} else if ( res['href'] ) {
rep = '[[' + res['href'] + ']]';
}
$.GollumEditor.replaceSelection( rep );
}