chiark / gitweb /
m.htmlsanity: better consistency for collapsed <p>s in additional fields.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 2 Nov 2017 17:51:47 +0000 (18:51 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 2 Nov 2017 17:51:47 +0000 (18:51 +0100)
commit0f1036e8a6df0235dc424f5f02be027b56331478
tree42af066b6e9a7ba0722fbcec03fcba7e1104decd
parent9367c16dc9d10c5b4b00b824625e352327c35e7f
m.htmlsanity: better consistency for collapsed <p>s in additional fields.

Previously (and that's also how stock Pelican behaves) article summaries
and other FORMATTED_FIELDS had <p> collapsing disabled completely. That
made some inconsistencies in the HTML markup (i.e., a m.css note in
article summary would look slightly differently compared to a note in
article content because of the additional <p>).

Now <p>s are collapsed for FORMATTED_FIELDS as well and the HTML writer
has an additional exception that it *does not* remove <p>s from nodes
that are directly inside field bodies.
pelican-plugins/m/htmlsanity.py