Using pre-formated text in a MediaWiki Template.

I needed to use <pre> tags in a MediaWiki template, which turned out to be non-trivial.  Using <code> and <poem> both fail to wrap single lines, as did the custom <div> styling.  It was easier to figure it out than add a bunch of <br>s to the source text.  For those looking for an ugly kludge, here you go. Enjoy.  (Non-salient bits removed: I do wrap the categories in <noinclude></noinclude>)


pre style="margin-left:2em;font-weight: bold">


{{{1|No Text Provided}}

{{PG|Some Text To Display Preformatted}}

Further Reading:

No comments: