Login  Register

Re: Including code blocks in a list without breaking the item numbering

Posted by mojavelinux on Jun 09, 2014; 7:34am
URL: https://discuss.asciidoctor.org/Including-code-blocks-in-a-list-without-breaking-the-item-numbering-tp1781p1800.html

Andy,

Another convention I strongly recommend when using complex content in a list item is to nest that content in an open block. The open block effectively becomes a "catch-all" container that explicitly sets the boundaries of the list item.

Here's an example:

. Item #1
+
--
attached paragraph

[source,java]
----
public class Person {
  private String name;
  // ...
}
----

another paragraph
--

. Item #2

We are discussing the option of allowing the list continuation lines (the lines with the + sign) to be indented so they are easier to trace. Many users, including myself, sense a friction with aligning the list continuation with the margin. See https://github.com/asciidoctor/asciidoctor/issues/686.

Cheers,

-Dan


On Wed, Jun 4, 2014 at 10:51 AM, awilkinson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks very much, that did the trick.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Including-code-blocks-in-a-list-without-breaking-the-item-numbering-tp1781p1783.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



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