Description

MoinMoin creates an empty paragraph tag before each header tag in its HTML output. Thats annoying, as paragraphs often are styled with a margin, adding this margin to the heading's margin (in my case, some of my headings don't have an upper margin).

Steps to reproduce

Take a look at any HTML output of Moin. You will see something like

<p class="line867">
<h1 id="Description">Description</h1>

Note:

Example

Any Moin wiki, any Moin page I've looked into the HTML code.

Component selection

Details

Workaround

Haven't found any yet. The :emtpy pseudo-selector doesn't work because that paragraph contains a linebreak. Any ideas?

Just a weird idea: if this p/h combination is always the case, could you compensate with a negative margin in the h for the unwanted margin of the p?

Maybe, but that's a really ugly hack. A workaround with the p:empty pseudo-selector would be nicer.

Discussion

p generation is a rather complicated/weird thing in moin 1.x. if one touches it (to fix some issue), it likes to break at another place. that's one of the reasons why parsing / generating html works completely different in moin2 - so the long term fix for this kind of issues is moin2.

Ok, I see. But can we at least get rid of that newline between both tags? This would make in possible for the p:emtpy selector to work.

One could filter the output by something similiar to import driver.

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/EmptyLineBeforeHeadings (last edited 2011-06-13 19:48:26 by ReimarBauer)