graphgist icon indicating copy to clipboard operation
graphgist copied to clipboard

toc macro not supported

Open abelsromero opened this issue 9 years ago • 6 comments

I wanted to set the table of contents at some specific point using the :toc: macro(http://asciidoctor.org/docs/user-manual/#manual-placement) option.

But when including the toc::[] macro, rendering fails with the message:

Error while parsing the AsciiDoc source - TypeError:
Cannot read property '_scope' of undefined

abelsromero avatar Aug 17 '15 12:08 abelsromero

I think the issue is that an old version of Asciidoctor is used. We have it working over at http://gist.asciidoctor.org/ which uses a more recent version.

nawroth avatar Aug 17 '15 12:08 nawroth

Seems so, the last commtit on asciidoctor.js reads Upgrade to asciidoctor.js 1.5.0.preview.1..

It only requires to replace the file right?

abelsromero avatar Aug 17 '15 15:08 abelsromero

Asciidoctor made some changes to the syntax in later versions but we could have compat-mode enabled by default maybe. My thinking has been to do the upgrade when we do other changes to the GraphGist format anyhow.

nawroth avatar Aug 17 '15 16:08 nawroth

I did a quick try, and the queries etc didn't work. TOCs worked fine though. My guess is that the produced HTML differs a bit somewhere so the post-processing doesn't find what it's looking for.

nawroth avatar Aug 17 '15 16:08 nawroth

I am having some minor issues with the TOC as well, but I'm not sure what is causing them. It seems to work sometimes and others not.

whatSocks avatar Aug 21 '15 18:08 whatSocks

What toc options are you trying?

abelsromero avatar Aug 21 '15 21:08 abelsromero