diff options
author | Robert Speicher <robert@gitlab.com> | 2017-02-27 19:23:05 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-02-27 19:23:05 +0000 |
commit | e051ef69e3adb5d8a06a5f7fb5719c7987fe4841 (patch) | |
tree | cb43939bec4425130b380d45e80c1ad0c80f6a0d /lib | |
parent | 5cd79bd641c4cd473da768b08ef18dc285f10b8e (diff) | |
parent | b8cab61ff016156e8c527322bb72d4185d752e44 (diff) | |
download | gitlab-ce-e051ef69e3adb5d8a06a5f7fb5719c7987fe4841.tar.gz |
Merge branch '20890-comment-image-inline' into 'master'
28711-cherry-picking-ui-regressions-8-17-0
Fix inline comment images by removing wrapper #20890
Closes #20890
See merge request !5804
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 |