asciidoc: source block aligned into nested list item

565 Views Asked by At

I'm trying to arrange tabulation.

I need a source block is nested block inside a nested list item:

list:

. Restore buckups
 * List logical names:
+ 
 RESTORE FILELISTONLY from DISK = '/var/opt/mssql/backup/xxxx.bak'
+
Sample output:
[source,options="nowrap"]
----
include::doc/samples/logical_names.out[]
----
 * Another nested list element...

Currently, it appears as:

enter image description here

I need source block is arranged at the same level of nested list item.

Any ideas.

1

There are 1 best solutions below

0
On

In your example source, the source block terminates the Sample output: paragraph. Since there is no continuation included, it also terminates the list item, and the list, because a source block is not a list item (by itself).

The solution is to include a continuation between the two elements:

Sample output:
+
[source,options="nowrap"]

Note that you'll need to add a blank line between the source block and the next list item, to provide a clear separation between the two.
After above change: enter image description here