Re: Table of contents -- need some AST code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Table of contents -- need some AST code

mojavelinux
Administrator
For a block, it's either

lines - array of lines
source - string source (lines joined on endline)

Both give you the preprocessed source, not the original source from the file. For the latter, you need to enable the sourcemap option, then use the source location (file and lineno) properties to determine where to snip.

-Dan

On Tue, Dec 15, 2015 at 8:08 PM, jxxcarlson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Let's call the needed method 'raw_content'.  i see how it could
be written using the blocks an line methods plus a little
recursion, but if the method already exists, so much the better.


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



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen