WebEngage / gitbook-plugin-copy-code-button

gitbook-plugin-copy-code-button
Apache License 2.0
20 stars 13 forks source link

asciidoc codeblocks #1

Open nagim opened 8 years ago

nagim commented 8 years ago

Hi,

Love your plugin, nice work. However, if I want to escape formatting in AsciiDoc codeblocks, the Copy button does not work. Example for such codeblock:

[subs="quotes",source]
----
source code here
----

This is the error message from Developer Tools console: Uncaught TypeError: Failed to execute 'selectNodeContents' on 'Range': parameter 1 is not of type 'Node'.

Could you please check if you can add support?

Thanks a lot! Imre

nagim commented 8 years ago

Hi,

I investigated a bit and it looks like adding the <pre> tag as code container in addition to <code> would solve the problem. Could you please add this modification and I would test it?

Thanks a lot! Imre