Files
spring-restdocs/spring-restdocs-asciidoctor
Andy Wilkinson ba327f1e9a Ensure that all nodes for a snippet refer to main document
Previously, when the operation block macro rendered the fragment
for a snippet, every top-level block in the fragment had its parent
set. Setting the parent has the side-effect of also setting the
block's document to be that of its parent. This meant that every
top-level block's document referred to the main document, but any
descendents were left with their document referring to the fragment
document. This did not cause a problem with the HTML backend (which
does not consider a block's document) but the PDF backend does
consider a block's document resulting in the descendents being
omitted from the generated PDF.

This commit updates the operation block macro to set the parent of
every block in the fragment to its correct value. This has the
side-effect of causing the block to update its document reference to
point to the main document.

Closes gh-396
2017-05-30 13:11:01 +01:00
..