uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.
BSD 3-Clause "New" or "Revised" License
128 stars 10 forks source link

preprocess fails when attributes are used in nested fenced divs #39

Closed joshuahhh closed 1 year ago

joshuahhh commented 2 years ago
::: div1 {a=b}
::: div2
:::
:::

preprocesses to

::: {.div1 a=b}
::: div2
:::
:::

which is expected. But

::: div1
::: div2 {a=b}
:::
:::

preprocesses to

::: div1
::: div2 {a=b}
:::
:::

which pandoc can't parse.

I think I can route around this for now by only using the ::: {.div2 a=b} form in nested divs.

joshuahhh commented 2 years ago

I ran into a related problem (failure of "ensure line blocks in a fence are treated as block elements" in preprocess, in nested divs) and debugged it a bit. Looks like preprocess doesn't handle nested divs in general.