File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 5252 end
5353end
5454
55+ # keeps copy target in hidden span because properties may contain unescaped quotes
56+ # therefore, prefer 'data-clipboard-target' over 'data-clipboard-text'
57+ config_property_id = 0
58+ Extensions . register do
59+ inline_macro do
60+ named :config_property_copy_button
61+ resolve_attributes false
62+ process do |parent , target , attrs |
63+ copy_btn = %(<span id="dotted-config-property-#{ config_property_id } " style="display:none">#{ target } </span><button class="btn-copy fa fa-clipboard inline-btn-copy" data-clipboard-action="copy" data-clipboard-target="#dotted-config-property-#{ config_property_id } " title="Copy to clipboard" do-not-collapse="true"></button>)
64+ config_property_id += 1
65+ create_inline_pass parent , %(#{ copy_btn } )
66+ end
67+ end
68+ end
5569
5670### ALL CONFIG page processors
5771
You can’t perform that action at this time.
0 commit comments