From bcb5951ac014477e6322cbd50cc97f5c51dc3d19 Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Mon, 31 Aug 2015 01:53:20 -0400 Subject: [PATCH] Fixing inconsistent behaviour between drawLink() and drawImage(). I've noticed inconsistent behaviour between links and images. Here's a screencast to show what I mean: http://recordit.co/VeU4EJQeWP --- src/js/simplemde.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/simplemde.js b/src/js/simplemde.js index aead965..06d89ef 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -203,7 +203,7 @@ function drawLink(editor) { function drawImage(editor) { var cm = editor.codemirror; var stat = getState(cm); - _replaceSelection(cm, stat.image, '![](http://', ')'); + _replaceSelection(cm, stat.image, '![', '](http://)'); }