Skip to content

Commit

Permalink
Add inline macro for copying of configuration properties in dotted fo…
Browse files Browse the repository at this point in the history
…rmat (#2157)
  • Loading branch information
michalvavrik authored Nov 12, 2024
1 parent c1eb810 commit fd65411
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _plugins/asciidoctor-extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@
end
end

Extensions.register do
inline_macro do
named :config_property_copy_button
resolve_attributes false
process do |parent, target, attrs|
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>)
create_inline_pass parent, %(#{copy_btn})
end
end
end

### ALL CONFIG page processors

Expand Down

0 comments on commit fd65411

Please sign in to comment.