Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.6k
Description
I noticed a change in Pandoc 2.8 (which might be from9f984ff), but I'm not sure it is intended. Before 2.8, attributes of a header are added to its parentdiv
(orsection
) when--section-divs
is enabled, such as the class attribute:
$ pandoc -t html4 --section-divs<<<"# Hello {.foo}"<div id="hello" class="section level1 foo"><h1>Hello</h1></div>
With 2.8+, the class attribute is added toh1
:
$ pandoc -t html4 --section-divs<<<"# Hello {.foo}"<div id="hello" class="section level1"><h1 class="foo">Hello</h1></div>
(Note that theid
attribute is still on thediv
instead ofh1
, though.)
We have plenty of (R Markdown) applications that depend on the previous behavior, i.e., theclass
attribute being added to the parentdiv
instead of the header itself. For example, previously we could style a whole section by defining CSS rules for.foo { }
. Now these rules are only applied to the header elements. We also have JavaScript applications that rely on this behavior. I wonder if there is a chance to restore the old behavior. Thank you!