Thanks a lot Lex, that makes sense. I'll probably just turn --safe mode on for making PDFs and build HTML without it.
Terry On Tue, May 7, 2013 at 1:36 AM, Lex Trotman <ele...@gmail.com> wrote: > > > > On 7 May 2013 08:07, <te...@jon.es> wrote: > >> Turns out the people (O'Reilly) who are remotely building the doc I am >> creating are running asciidoc with --safe. I'm trying to do that locally >> too so as to make sure what I do will build correctly on their end. But I >> see the following (asciidoc 8.6.8): >> >> $ cd /tmp >> >> $ echo '= xxxx' > file.txt >> $ asciidoc --safe --doctype=book --backend=html file.txt >> asciidoc: ERROR: file.txt: line 1: unsafe: ifeval invalid >> asciidoc: FAILED: file.txt: line 1: ifeval invalid safe document >> >> >> When I run with --verbose and without --safe, the output seems to >> indicate what ifeval is being run. >> >> $ asciidoc --verbose --doctype=book --backend=html file.txt >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/asciidoc.conf >> asciidoc: reading: /tmp/file.txt >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/xhtml11.conf >> asciidoc: include1: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/stylesheets/asciidoc.css >> asciidoc: file.txt: line 1: ifeval: "source-highlight"=="pygments": False >> asciidoc: include1: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/javascripts/asciidoc.js >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/filters/code/code-filter.conf >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/filters/graphviz/graphviz-filter.conf >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/filters/latex/latex-filter.conf >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/filters/music/music-filter.conf >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/filters/source/source-highlight-filter.conf >> asciidoc: file.txt: line 1: ifeval: >> "source-highlight"=="source-highlight": True >> asciidoc: file.txt: line 1: ifeval: "source-highlight"=="highlight": False >> asciidoc: file.txt: line 1: ifeval: "source-highlight"=="pygments": False >> asciidoc: reading: >> /usr/local/Cellar/asciidoc/8.6.8/etc/asciidoc/lang-en.conf >> asciidoc: writing: /tmp/file.html >> >> >> Seems a conditional to test what source code highlighter is in use is >> causing the error in --safe mode. Am I doing something wrong here? >> > > Hi Terry, > > You are doing nothing wrong, a recent change to the way the source > highlighter is chosen means that the xhtml backend always evaluates, (runs > ifeval) which makes it "unsafe". > > Until a fix is made you can create a local xhtml.conf (if you don't > already have it) and add the [header] section from the system xhtml.conf. > Its a big section, just copy it with an editor. > > There are two lines starting ifeval, just delete those lines and the two > lines following each (ie to and including the next endif:: line). > > If you use pygments you will now need to use the deprecated method of > setting the pygments attribute to select it. If you don't use pygments, no > problems. > > Cheers > Lex > > >> >> Thanks a lot, again! >> >> Terry >> >> -- >> You received this message because you are subscribed to the Google Groups >> "asciidoc" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to asciidoc+unsubscr...@googlegroups.com. >> To post to this group, send email to asciidoc@googlegroups.com. >> Visit this group at http://groups.google.com/group/asciidoc?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to asciidoc+unsubscr...@googlegroups.com. > To post to this group, send email to asciidoc@googlegroups.com. > Visit this group at http://groups.google.com/group/asciidoc?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to asciidoc+unsubscr...@googlegroups.com. To post to this group, send email to asciidoc@googlegroups.com. Visit this group at http://groups.google.com/group/asciidoc?hl=en. For more options, visit https://groups.google.com/groups/opt_out.