MCPcopy
hub / github.com/Dynalon/mdwiki / wrapImage

Function wrapImage

js/bootstrap.js:427–434  ·  view source on GitHub ↗
($imgages, wrapElement)

Source from the content-addressed store, hash-verified

425
426 // if the image is a link, wrap around the link to avoid
427 function wrapImage($imgages, wrapElement) {
428 return $images.each(function (i, img) {
429 var $img = $(img);
430 var $parent_img = $img.parent("a");
431 if ($parent_img.length > 0) $parent_img.wrap(wrapElement);
432 else $img.wrap(wrapElement);
433 });
434 }
435
436 if ($p.hasClass("md-floatenv")) {
437 if ($images.length === 1) {

Callers 1

replaceImageParagraphsFunction · 0.85

Calls 1

$Function · 0.85

Tested by

no test coverage detected