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
This commit is contained in:
Jesse Leite 2015-08-31 01:53:20 -04:00
parent 25bbed7ae8
commit bcb5951ac0

View File

@ -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://)');
}