[Mediawiki-l] Preventing extension output from being wrapped with "<p>" and "</p>"?

Ken McDonald ken at pixologic.com
Thu May 31 18:21:01 UTC 2007


This was a huge help, something I would never have figured out on my 
own. And of course, I can use the CSS 'block' property to get the 
behavior I want anyway. Many thanks!

Ken



Jim Wilson wrote:
> The reason the output is being wrapped in <p> tags is that the output of
> your extension is detected by the Parser as being something other than a
> block level element[1].  If your extension would output a <div> or <pre> tag
> instead of <span>, you might see a difference.
>
> [1] http://htmlhelp.com/reference/html40/block.html
>
> -- Jim R. Wilson (jimbojw)
>
> On 5/30/07, Ken McDonald <ken at pixologic.com> wrote:
>   
>> Sigh, having written a couple of extensions to (separately) insert HTML
>> opening and closing tags into pages, I find that the output of those
>> extension tags is being wrapped in <p>...</p>. This occurs even if I
>> don't put line breaks before/after the tags (and omitting line breaks
>> messes other things up anyway).
>>
>> For example, one of my tags outputs: <span style="display:block;
>> float:left; width:33%">
>>
>> and in the HTML I get:
>>
>> <p><span style="display:block; float:left; width:33%">
>> </p>
>>
>> which is not only not what I want, but also incorrect HTML!
>>
>>
>> Thanks,
>> Ken
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l at lists.wikimedia.org
>> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>>     
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>   




More information about the MediaWiki-l mailing list