Skip to content

Commit

Permalink
Merge pull request asciidoctor#231 from mojavelinux/issue-229
Browse files Browse the repository at this point in the history
resolves asciidoctor#229 fix XML-friendly callout example
  • Loading branch information
mojavelinux committed Jul 15, 2014
2 parents 5b904c5 + ec15396 commit 3a67aa5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docs/_includes/callout-xml.adoc
Expand Up @@ -4,21 +4,21 @@ Included in:
- user-manual: callouts: XML-friendly callouts
////
XML doesn't have line comments, so our "tuck the callout behind a line comment" trick doesn't work here.
XML doesn't have line comments, so our ``tuck the callout behind a line comment'' trick doesn't work here.
To use callouts in XML, you must place the callout's angled brackets around the the XML comment and callout number.

Here's how it appears in a listing:

[source]
[source,subs="specialcharacters"]
....
include::ex-callout.adoc[tags=non-xml]
include::ex-callout.adoc[tags=source-xml]
....

Here's how it looks when rendered:

====
include::ex-callout.adoc[tags=non-xml]
include::ex-callout.adoc[tags=source-xml]
====

Notice the comment is gone.
Notice the comment has been replaced with a circled number that cannot be selected.
Now both you and the reader can copy and paste XML source code containing callouts without worrying about errors.
4 changes: 2 additions & 2 deletions docs/_includes/ex-callout.adoc
Expand Up @@ -16,15 +16,15 @@ line of code ;; <3>
<3> A callout behind a line comment for Clojure.
// end::b-nonselect[]

// tag::non-xml[]
// tag::source-xml[]
[source,xml]
----
<section>
<title>Section Title</title> <!--1-->
</section>
----
<1> The section title is required.
// end::non-xml[]
// end::source-xml[]

// tag::b-src[]
[source,ruby]
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc-syntax-quick-reference.adoc
Expand Up @@ -677,12 +677,12 @@ include::{includedir}/ex-callout.adoc[tags=b-nonselect]
[listing, subs="specialcharacters"]
.XML code block with a non-selectable callout
....
include::{includedir}/ex-callout.adoc[tags=non-xml]
include::{includedir}/ex-callout.adoc[tags=source-xml]
....

[.result]
====
include::{includedir}/ex-callout.adoc[tags=non-xml]
include::{includedir}/ex-callout.adoc[tags=source-xml]
====

[listing]
Expand Down

0 comments on commit 3a67aa5

Please sign in to comment.