[pmwiki-users] Strip markup to generate plain text

Peter & Melodye Bowers pbowers at pobox.com
Wed Feb 13 10:14:43 CST 2008

> Sorry for being so unclear. Markdown in this case is text
> formatting system that is quite popular
> <http://daringfireball.net/projects/markdown/syntax>.
> But what I'm looking for is something that will allow me to
> strip PmWiki syntax from the stuff I've written and generate
> plain text. Even better would be a something that generated
> slightly formatted text.

If you could give a list of elements you would want to replace and what you
would want to replace them with I'm sure some sort of markup2markdown could
be put together.  It doesn't sound like a difficult thing to build -- just a
bunch of preg_replace's unless you want stuff done with multi-line markups
and conditional and etc.

The thing that will take time and effort is coming up with the list of
changes that would look like this:

ORIGINAL: [[link]]
ORIGINAL: [[link|title]]
CHANGE TO: title
ORIGINAL: ''text''
ORIGINAL: '''text'''
ORIGINAL: -> text
CHANGE TO: <tab>text
CHANGE TO: <4 spaces>text


If you'll get me a list like that I'll put it into an MX for inclusion in
PowerTools (if Hans is agreeable for that location).  Or I can give you the
skeleton for it and you can put the preg_replaces yourself if you're into


More information about the pmwiki-users mailing list