Difference between revisions of "Test5554"

From FollowTheScore
Jump to: navigation, search
(New page: {{Issue |Type = Change Request <-- please select |Extension = DPL |Version = ? |Description = Ordered lists with leading question mark can break the layout with missing ...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Issue
 
|Type        = Change Request  <-- please select
 
|Extension  = DPL
 
|Version    = ?
 
|Description = Ordered lists with leading question mark can break the layout with missing ol tag
 
|Status      = open
 
}}
 
  
== Problem ==
 
<!-- For the search results: template div break layout ordered lists # ? #? -->
 
Took me 8 hours to find the devil in a much more complicated code. Here's the issue: When you include chapters starting with an ordered list into divs (?) you should not forget the ending \n (?). Dunno exactly but compare:
 
 
<pre>{{#dpl:
 
|category=Test3001
 
|include = ##.*Heading.*
 
|format=\n,<div style="border:1px solid #aaa; margin:15px 0 5px 0">[[%PAGE%]],</div>\n,
 
}}</pre>
 
{{#dpl:
 
|category=Test3001
 
|include = ##.*Heading.*
 
|format=\n,<div style="border:1px solid #aaa; margin:15px 0 5px 0">[[%PAGE%]],</div>\n,
 
}}
 
 
<pre>{{#dpl:
 
|category=Test3001
 
|include = ##.*Heading.*
 
|format=\n,<div style="border:1px solid #aaa; margin:15px 0 5px 0">[[%PAGE%]],</div>,
 
}}</pre>
 
{{#dpl:
 
|category=Test3001
 
|include = ##.*Heading.*
 
|format=\n,<div style="border:1px solid #aaa; margin:15px 0 5px 0">[[%PAGE%]],</div>,
 
}}
 
 
 
Olli2 uses an ordered list with a blank after #. What happens (from my baisc understaning) is that the MW parser replaces # ? with <nowiki><li>&nbsp;?</nowiki>. If there is no line break in the resulted source code the surrounding ol tag is not added on chapter inclusion.
 
 
No idea if it's the parser caus DPL to be3 confused or just the missing \n confused DPL. Anway, the solution is the \n after the div tag.
 
 
Bummer! :D
 
 
== Reply ==
 

Latest revision as of 05:05, 2 May 2009