Skip to content

Commit e43f5e2

Browse files
authored
Merge pull request #69516 from wgordon17/fix-edit-button
Fix edit button missed content
2 parents b7e102d + 5589ca9 commit e43f5e2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

_converters/custom-html5-converter.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def initialize backend, opts = {}
4040
# so placing an edit button at the top encompasses a whole-page
4141
# edit
4242
def convert_embedded node
43-
parent_output = super node
43+
parent_output = super
4444
if @show_edit_button && node.source_location.nil?
4545
%(<div class="edit-page-button edit-button">
4646
<a href="https://github.com/#{ @github_repo }/edit/#{ @branch_name }/#{ node.attributes["repo_path"] }" target="_blank">
@@ -57,21 +57,20 @@ def convert_embedded node
5757
# for content such as "snippets", etc. and focuses primarily
5858
# on modules
5959
def convert_section node
60-
parent_output = super node
60+
parent_output = super
6161
if @show_edit_button && node.source_location
6262
file_path = node.source_location.path.include?("modules") ? node.source_location.path : node.source_location.file.sub(node.source_location.dir + "/", "")
6363

6464
if @seen_files.empty? || !@seen_files.include?(file_path)
6565
@seen_files << file_path
66-
%(<div class="edit-section-button edit-button">
66+
return %(<div class="edit-section-button edit-button">
6767
<a href="https://github.com/#{ @github_repo }/edit/#{ @branch_name }/#{ file_path }" target="_blank">
6868
<span class="material-icons-outlined" title="Suggest a section edit">edit</span>
6969
</a>
7070
</div>
7171
#{ parent_output })
72-
end
73-
else
74-
parent_output
72+
end
7573
end
74+
parent_output
7675
end
7776
end

0 commit comments

Comments
 (0)