Login  Register

Re: max depth for includes?

Posted by mojavelinux on Nov 06, 2013; 11:48am
URL: https://discuss.asciidoctor.org/max-depth-for-includes-tp936p939.html

Thomas,

I may need to look closer into this, but my gut is telling me it has to do with the file extension. Asciidoctor doesn't process the lines as AsciiDoc in an include file if it doesn't recognize the extension as an AsciiDoc file.

I have a feature request in to override this behavior, but it's not yet implemented. The easiest way is to add the file extension .adoc, .ad or .asciidoc (.asc works too, but we discourage its use)

If the file extension isn't the issue, we'll need to dig deeper.

Btw, you don't need to set safe mode when using the cli, only the api. The default for the cli is unsafe.

I hope that gets you to the next step in solving this one!

-Dan

On Nov 5, 2013 3:25 AM, "thomas burger [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hello,

Seem to be stuck. I can see that max-include-depth has a default value set to 64, however it still seems that 1 is the limit for include depth? Explicitly setting via cli max-include-depth=0 works to disable includes, but setting above 1 does not seem to make any difference. Setting depth=64 didn't work either. Is there are a trick to getting past a depth of 1 ?  

> asciidoctor --version
Asciidoctor 0.1.4 [http://asciidoctor.org]
> asciidoctor -a max-include-depth=64 -S unsafe file1

file1:
THIS IS FILE ONE. +
LETS INCLUDE TWO: +
include::file2[depth=64]

file2:
THIS IS FILE TWO. +
LETS INCLUDE THREE: +
include::file3[depth=64]

file3:
THIS IS FILE THREE.

Result:
THIS IS FILE ONE.

LETS INCLUDE TWO:

THIS IS FILE TWO.

LETS INCLUDE THREE:

include::file3[depth=64]



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/max-depth-for-includes-tp936.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML