Last modified: 2011-04-14 15:12:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18352, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16352 - Using ; : syntax for definition lists, with a multi-line <pre> block in the definition part, ends the <dd> too early.
Using ; : syntax for definition lists, with a multi-line <pre> block in the d...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/wiki/Benutzer...
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-15 13:42 UTC by Purodha Blissenbach
Modified: 2011-04-14 15:12 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Purodha Blissenbach 2008-11-15 13:42:47 UTC
On the sample page, you find three block which I expected to be identical (like the 3rd) but two of them are not.
Comment 1 Krinkle 2011-04-04 14:03:41 UTC
There's no need to use <nowiki> inside <pre>, <pre> is already nowiki-fied, as such I've removed them from your example page to simply the demo since there is no difference betweeen them in output.

The bug is related to where the line-break is. Rephrazing summary.
Comment 2 Bawolff (Brian Wolff) 2011-04-04 16:43:25 UTC
This is partially a tidy issue (well actually without tidy its even more borked... Anyways, try it in [[special:expandtemplates]] to see what i mean).

Mediawiki interprets
;Foo: Bar

To mean a definition list where the term Foo is defined by Bar. MediaWiki expects all the content of the definition when using ; : lists to be on the same line, so after the first line break in the pre, MediaWiki considers that to be the end of the <dd> tag (Thus in your example, resulting in a <dd> tag that looks like <dd><pre></dd>, which is striped by tidy). The browser (or tidy) see's the closed </dd> but no closing </pre> , so assumes the closing tag for pre was missed, and closes it.

So MediaWiki would either have to see that a pre started inside the <dd> and wait for the </pre> before closing the <dd>, or it could just stop the <dd> as soon as it sees a <pre>. However doing that would break the usecase of doing ;Foo:<pre>bar</pre> which does work fine.

Minimal test case is:
;Foo:<pre>
bar</pre>

Compared to:
;Foo:
<pre>
bar</pre>

Or (probably closer to your expected behaviour)

;Foo:<pre>bar</pre>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links