[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

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