From d67055469de0093472d897276def47e6d97bac2a Mon Sep 17 00:00:00 2001 From: Alex Vargas Benamburg Date: Mon, 22 Jan 2018 23:33:14 -0600 Subject: [PATCH] fix: no wrap images that already wrapped --- static/js/hugo-learn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/hugo-learn.js b/static/js/hugo-learn.js index b20313a2cc..213e31e993 100644 --- a/static/js/hugo-learn.js +++ b/static/js/hugo-learn.js @@ -21,7 +21,9 @@ var images = $("div#body-inner img").not(".inline"); // Wrap image inside a featherlight (to get a full size view in a popup) images.wrap(function(){ var image =$(this); - return ""; + if (!image.parent("a").length) { + return ""; + } }); // Change styles, depending on parameters set to the image