Login  Register

Re: Handling large code blocks

Posted by mojavelinux on Dec 20, 2018; 10:01am
URL: https://discuss.asciidoctor.org/Handling-large-code-blocks-tp6653p6654.html

Ashton,

You'd do that using an extension. It would be somewhat similar to the show results docinfo processor (which does it entirely with JavaScript). It's similar to what you see on this page:  https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/

The main difference would be that it would hide part of the listing block instead of hiding a different block. But the idea is basically the same.


Cheers,

-Dan

On Wed, Dec 19, 2018 at 5:38 AM ashtontreadway [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi!

We have some very large code blocks that we want to include in a topic as selectable text, without making the topic unreadable.

In an ideal world, we'd be able to include the block as an excerpt of two or three lines, which when clicked would expand to the full block.

Is there a way to do this elegantly in AsciiDoc/AsciiDoctor?

Thanks,

Ashton


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


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux