Login  Register

Asciidoctor issue with snippet (1.0.4)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Asciidoctor issue with snippet (1.0.4)

ch007m
I have a strange problem that I don't understand. When I use asciidoctor (v1.4) to parse a file containing the include:: directive with a tag defined, that works very well on the command line

ex : asciidoctor index.txt

where index.txt =

include::file1.ad[tags=snippetCompanion]

and by example

file : file1.ad -->

############
This is a test

// tag::snippetCompanion[]
Hello from Snippet
// end::snippetCompanion[]
###########

But if I would like to process this file using Ruby code -->

Asciidoctor.render_file(f, options)

where f = index.txt

The rendering is done but the HTML generated does not include only the snippet tag BUT all the text. I have started to debug and confirm that my snippet tag is discovered and preprocessed (reader.rb class) . But why the HTML rendered contains the text outside of the snippet tag is until now a mystery for me. If someone could help me, that should be nice

Regards,

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Asciidoctor issue with snippet (1.0.4)

ch007m
Problem solved. Find my mistake.
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Asciidoctor issue with snippet (1.0.4)

mojavelinux
Administrator

Set the safe mode to 'server' or less, right?

-Dan

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Asciidoctor issue with snippet (1.0.4)

ch007m
Issue with my code. I was overriding the file created correctly with the snippet


On Mon, Aug 11, 2014 at 6:15 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Set the safe mode to 'server' or less, right?

-Dan




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-issue-with-snippet-1-0-4-tp1974p1976.html
To unsubscribe from Asciidoctor issue with snippet (1.0.4), click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard