File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def initialize backend, opts = {}
40
40
# so placing an edit button at the top encompasses a whole-page
41
41
# edit
42
42
def convert_embedded node
43
- parent_output = super node
43
+ parent_output = super
44
44
if @show_edit_button && node . source_location . nil?
45
45
%(<div class="edit-page-button edit-button">
46
46
<a href="https://github.com/#{ @github_repo } /edit/#{ @branch_name } /#{ node . attributes [ "repo_path" ] } " target="_blank">
@@ -57,21 +57,20 @@ def convert_embedded node
57
57
# for content such as "snippets", etc. and focuses primarily
58
58
# on modules
59
59
def convert_section node
60
- parent_output = super node
60
+ parent_output = super
61
61
if @show_edit_button && node . source_location
62
62
file_path = node . source_location . path . include? ( "modules" ) ? node . source_location . path : node . source_location . file . sub ( node . source_location . dir + "/" , "" )
63
63
64
64
if @seen_files . empty? || !@seen_files . include? ( file_path )
65
65
@seen_files << file_path
66
- %(<div class="edit-section-button edit-button">
66
+ return %(<div class="edit-section-button edit-button">
67
67
<a href="https://github.com/#{ @github_repo } /edit/#{ @branch_name } /#{ file_path } " target="_blank">
68
68
<span class="material-icons-outlined" title="Suggest a section edit">edit</span>
69
69
</a>
70
70
</div>
71
71
#{ parent_output } )
72
- end
73
- else
74
- parent_output
72
+ end
75
73
end
74
+ parent_output
76
75
end
77
76
end
You can’t perform that action at this time.
0 commit comments