Question: How to escape the special character in a include command?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question: How to escape the special character in a include command?

lucasw
I got following problem when using the include command.
eg.
....
include::resources/bind-my-example.txt[]
....
in the bind-my-example.txt, there are something like:

....
  [oc:bind] |  Bind result:
....

As a result, it failed to escape "|" in a table, which caused a mess-up.

I can work around by adding "\" in the bind-my-example.txt before "|". I think there should be another decent way to handle this case.
asciidoctor Version: 1.5.2
Thanks a lot.
Reply | Threaded
Open this post in threaded view
|

Re: Question: How to escape the special character in a include command?

DocEvaluator
You did not write an example of how you included your text file.
This example worked for me without problems:
.My table title
[cols="1,1",options="header",]
|====
2+| Headline, spanned above two columns 
|include works, no need to mask the pipe        a| include::test-include.adoc[] 
|works not, include command not recognized       | include::test-include.adoc[] 
|====

Surely this works anyway
include::test-include.adoc[] 

test-include.adoc consists of:
[oc:bind] |  Bind result: