Skip to content

Commit fd65411

Browse files
authored
Add inline macro for copying of configuration properties in dotted format (#2157)
1 parent c1eb810 commit fd65411

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

_plugins/asciidoctor-extension.rb

+10
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@
5252
end
5353
end
5454

55+
Extensions.register do
56+
inline_macro do
57+
named :config_property_copy_button
58+
resolve_attributes false
59+
process do |parent, target, attrs|
60+
copy_btn = %(<button class="btn-copy fa fa-clipboard inline-btn-copy" data-clipboard-action="copy" data-clipboard-text='#{target}' title="Copy to clipboard" do-not-collapse="true"></button>)
61+
create_inline_pass parent, %(#{copy_btn})
62+
end
63+
end
64+
end
5565

5666
### ALL CONFIG page processors
5767

0 commit comments

Comments
 (0)