fixed #1988
fix double anchors around images

if the image is already inside an anchor dont wrap again
Merge remote-tracking branch 'origin/master' into 0.5.1