[Home]WikiPatches/PodStyleMarkup

UseModWiki | WikiPatches | RecentChanges | Preferences

This patch allows simple POD style markup within pages. There are just three codes implemented at the moment:

b<This Text Will Be In Bold>
i<This Text Will Be In Italics>
u<This Text Will Be Underlined>

Code lettercase is not significant. You can also combine codes like this.

bu<This Text Will Be In Bold And Will Be Underlined>

Note: Unlike in pod you can't (yet) do the multiple delimiters trick:

b<<This Won't Allow Embedded '<' Characters>>

If someone knows how to do this in regexp, then I'll happily include it :-)

This patch works well with my /MarkupWithinParagraphs patch - especially as this markup also works at paragraph level.

--DavidClaughton.


Insert the following code at approx line 1198 in the 0.92 release code, or about line 1239 if /MarkupWithinParagraphs has been applied. It needs to go just before the "if ($HtmlLinks)" line. On the 1.0 release code this is line 1632.

# POD Style Markup
s/
  ([biu]+)\&lt\;               # Match Opening tag
  (?>(.*?)((\n\n)|(\&gt\;)))   # Match upto Closing tag or end para.
  (?<!\n\n)                    # Fail if end of para.
/"<" . join("><", split("",$1)) . ">"
  . $2 .
  "<\/" . join("><\/", split("",scalar(reverse($1)))) . ">"
/gisex;                        # Replacement string.

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 22, 2009 1:51 pm by Juanmamp (diff)
Search: