diff options
author | Jared Deckard <jared.deckard@gmail.com> | 2016-08-13 00:13:39 -0500 |
---|---|---|
committer | Jared Deckard <jared.deckard@gmail.com> | 2016-08-13 18:31:26 -0500 |
commit | 2c0f375f13cafa305237c306f423b1dd9ea70a23 (patch) | |
tree | d0ce6ecf9e086e89e73f641916f80be1434b1d5c /lib | |
parent | 30f5b9a5b711b46f1065baf755e413ceced5646b (diff) | |
download | gitlab-ce-2c0f375f13cafa305237c306f423b1dd9ea70a23.tar.gz |
Fix inline comment images by removing wrapper #20890
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/image_link_filter.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/banzai/filter/image_link_filter.rb b/lib/banzai/filter/image_link_filter.rb index f0fb6084a35..651b55523c0 100644 --- a/lib/banzai/filter/image_link_filter.rb +++ b/lib/banzai/filter/image_link_filter.rb @@ -8,11 +8,6 @@ module Banzai # of the anchor, and then replace the img with the link-wrapped version. def call doc.xpath('descendant-or-self::img[not(ancestor::a)]').each do |img| - div = doc.document.create_element( - 'div', - class: 'image-container' - ) - link = doc.document.create_element( 'a', class: 'no-attachment-icon', @@ -22,9 +17,7 @@ module Banzai link.children = img.clone - div.children = link - - img.replace(div) + img.replace(link) end doc |