Skip to content

Conversation

7o7omootsqwn
Copy link

Thank you for your work on pandoc-ling.

This commit just adds a guard in the function processDiv which checks that a Div has content inside it before indexing into the content array. This makes the filter compatible with Divs that have no content inside them, which are supported by pandoc's model (though a bit of a strange corner case), and which I sometimes use in my own filters as placeholders for Block like elements which I calculate elsewhere then substitute into the document, e.g.

::: {.block-element}
:::

With the current code, if pandoc-ling is run before this substitution occurs, it attempts to index into the Div's content and fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant