brackets-asciidoc-preview
brackets-asciidoc-preview copied to clipboard
Support code folding
It would be nice to be able to collapse blocks, chapters, etc., similar to what this extension does.
:+1:
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.
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.
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 :)
:+1: