Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support code folding #19

Open
domgold opened this issue Nov 25, 2014 · 4 comments
Open

Support code folding #19

domgold opened this issue Nov 25, 2014 · 4 comments

Comments

@domgold
Copy link

domgold commented Nov 25, 2014

It would be nice to be able to collapse blocks, chapters, etc., similar to what this extension does.

@mojavelinux
Copy link
Member

👍

This should be possible at the block-level since Asciidoctor parses blocks to the AST and keeps the line numbers of the blocks (set sourcemap option to true). However, we may find we need more support in Asciidoctor core, which will get corrected if need be.

@nerk
Copy link
Member

nerk commented Nov 26, 2014

Yes, good idea. I have been thinking about this feature already for some time. As @mojavelinux mentioned, the core support is already there. Special handling of included documents is required, though. AFAIK, included documents are expanded and sourcemap information is related to the whole main document. Informaton about included docs is lost.

Maybe we could handle this through an 'include' extension and expand (unfold) include blocks on demand or something like that. Need to investigate further. Dan would know better.

@mojavelinux
Copy link
Member

Maybe we could handle this through an 'include' extension and expand (unfold) include blocks on demand or something like that. Need to investigate further. Dan would know better.

Sounds about right, but this is new territory for me to explore mentally, so I'm on the journey with you :)

@hwinkel
Copy link

hwinkel commented Jan 31, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants