Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses issue #9.
This patch changes the behavior of the script in all cases. The previous behavior was to add a
RawInline
element to the beginning of the first child of aDiv
, and anotherRawInline
element to the end of the last child. This behavior made sense if the first and last children werePlain
orPara
, but in general could break, leading to a crash.The new behavior is to add a
RawBlock
child as the first child of theDiv
, and anotherRawBlock
as the last child. The existing child nodes are unmodified. (This approach also simplifies the code.)It looks like in latex output this has the effect of including some extra newlines surrounding the raw latex code. In latex output this may result in some extra whitespace, depending on the environment. Since the pandoc latex writer seems to add newlines to pretty much any top-level element (
RawBlock
,Plain
) this seems hard to avoid. But I may be missing something.