Author: Shtriter
Description:
The nesting of definition lists like ";; x :: y" produces awful html.
Moreover, the parser outputs different html for 2 dls with the common structre.
The only difference between these lists is thet one of them is single-line and the other
is not.
The simple example:
;; x :: y
;; x
:: y
Output:
<dl><dt> x </dt><dd><dl><dt></dt><dd> y
</dd></dl>
</dd></dl>
<p><br>
</p>
<dl><dt></dt><dl><dt> x
</dt><dd> y
</dd></dl>
IMHO, single-line dl parcing is not quite right. The emply <dt><dt> should stay before
'<dt> x </dt>', like in multi-line variant.
I've discussed the problem on MediaWiki-General. TimStarling suggested to treat the second
semicolon as literal semicolon. It can be archived by adding new line:
$oLine = preg_replace( '/;(;)+/', ';<nowiki>$1</nowiki>', $oLine );
after
$preOpenMatch = preg_match('/<pre/i', $oLine );
PS. If there are more the one colon on the line (like in the first example), all colons,
starting from 2nd will be also treaten as literals. Cause "; x :: y" acts in the same
way.
Version: unspecified
Severity: normal