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.
 
 

23 lines
815 B

////
Included in:
- user-manual: Text Substitutions: Preventing substitutions
- writers-guide: preventing subs
////
Asciidoctor provides several approaches for preventing substitutions.
.Backslash escaping
// tag::backslash[]
To prevent punctuation from being interpreted as formatting markup, precede it with a backslash (`\`).
If the formatting punctuation begins with two characters (e.g., `+__+`), you need to precede it with two backslashes (`+\\+`).
This is also how you can prevent character and attribute references from substitution.
When your document is processed, the backslash is removed so it doesn't display in your output.
[source]
----
include::ex-subs.adoc[tag=slash]
----
// end::backslash[]
You can also prevent substitutions with <<user-manual#passthroughs,macro and block passthroughs>>.