From f15f8010d9e7d145fc2c62be8150dc2932aecc72 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 18:35:14 +0200 Subject: [PATCH] When inserting images in the markdown, drop responsive identifier from the filename. Fix #109 --- themes/grav/js/mdeditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/grav/js/mdeditor.js b/themes/grav/js/mdeditor.js index bf039dac..751e9fbe 100644 --- a/themes/grav/js/mdeditor.js +++ b/themes/grav/js/mdeditor.js @@ -83,6 +83,7 @@ editor.focus(); var filename = target.text(); + filename = filename.replace(/@3x|@2x|@1x/, ''); if (filename.match(/\.(jpg|jpeg|png|gif)$/)) { editor.doc.replaceSelection('![](' + encodeURI(filename) + ')'); } else {