Included files after list not rendered correctly

63 views Asked by At

main.asc:

== Items
include::foo.asc[]
include::bar.asc[]

foo.asc

=== Foo Title
==== List of things
* thing one
* thing two

bar.asc

=== Bar Title
this is a summary of bar

When main.asc is rendered, the following text is displayed:

Items

Foo Title

  • thing one
  • thing two === Bar Title

this is a summary of bar

I've also tried adding a simple paragraph at end of foo.asc after the list to see if that will fix the problem--it didn't.

Is there a way to fix this?

2

There are 2 answers

0
craig On BEST ANSWER

Adding a line between the two include statements seems to fix the issue:

== Items
include::foo.asc[]

include::bar.asc[]
0
Eduardo Santana On

You should always end all asciidoc files with a blank line, I actually keep a comment at the end of all my files to remember me:

////
Always end a file with a blank line to avoid include problems.
////

When you don't have a blank line the second file is included at end of previews line, and the result will be:

thing two === Bar Title