[pmwiki-users] Forcing wordwrap within [@ @] tags
Patrick R. Michaud
pmichaud at pobox.com
Mon Aug 29 22:49:33 CDT 2005
On Mon, Aug 29, 2005 at 11:55:44AM -0400, Waylan Limberg wrote:
> [...stuff about using wordwrap in pre...]
> ## Overriding markup of same name in stdmarkup.php
> ## Calls PreserveWrapText (above) instead of PreserveText
> Markup('[=','_begin',"/(\n[^\\S\n]*)?\\[([=@])(.*?)\\2\\]/se",
> "PreserveWrapText('$2', PSS('$3'), '$1')");
>
> And now for the questions:
> First, is this really the best way to do this?
Whether it's the best way or not, it's certainly a good one.
> Could someone help me write a markup rule that uses some different
> custom markup (perhaps (:prewrap:)) so the default behavior of [@ @]
> could still be used?
Sure, pick out the markup you want to use and I'll write the rule
for it. :-)
> I will probably alter the last line of PreserveWrapText() to wrap the
> text in <div class="somecustomclass"></div> rather than <pre> tags and
> then set .somecustomclass{whitespace:pre; ...} which allows me to also
> alter other formatting like background, border etc, without messing up
> any other use of <pre> tags on the site.
Better may be to instead do
<pre class='somecustomclass'>...</pre>
This allows styling of this particular set of <pre> tags
(without messing up others) and still indicates that the interior is
to be preformatted.
Pm
More information about the pmwiki-users
mailing list