You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
4 years ago
|
////
|
||
|
Included in:
|
||
|
|
||
|
- user-manual: callouts: Callouts don't get caught in copy
|
||
|
////
|
||
|
|
||
|
In versions prior to Asciidoctor 0.1.4, when a reader visiting an HTML page generated by Asciidoctor selected source code from a listing that contained callouts and copied it, the callout numbers would get caught up in the copied text.
|
||
|
If the reader pasted that code and tried to run it, likely the extra characters from the callouts would cause compile or runtime errors.
|
||
|
|
||
|
Asciidoctor uses CSS to prevent callouts from being selected.
|
||
|
|
||
|
On the other side of the coin, you don't want the callout annotations or CSS messing up your raw source code either.
|
||
|
You can tuck your callouts neatly behind line comments.
|
||
|
Asciidoctor will recognize the line comments characters in front of a callout number, optionally offset by a space, and remove them when converting the document.
|
||
|
|
||
|
Here are the line comments that are supported:
|
||
|
|
||
|
[source,subs=specialcharacters]
|
||
|
....
|
||
|
include::ex-callout.adoc[tag=b-nonselect]
|
||
|
....
|
||
|
|
||
|
Here's how it looks when rendered:
|
||
|
|
||
|
====
|
||
|
include::ex-callout.adoc[tag=b-nonselect]
|
||
|
====
|