[pmwiki-users] line breaks in custom markup
Ben Stallings
Ben at InterdependentWeb.com
Wed Jan 24 17:06:12 CST 2007
A client wants me to define a custom markup so that this wiki text:
* list item\\+
another line
will produce this HTML:
<li>list item<br />
<span class="whitespace"> <span><br />
another line</li>
Using this markup definition:
Markup('\\+','inline','/\\\\\\\\\\+/',"<br /><span
class='whitespace'> </span><br />");
}
gets me the desired result -- if there's no linebreak after the \\+. If
there is a linebreak, as in the desired wiki text, the wiki dutifully
ends the list and puts the second line in a new paragraph.
I'm sure this is really simple for someone who's competent with regular
expressions, but alas I don't have a clue how to include the linebreak
in the markup definition. When I add a \\n to it, it doesn't match
anything at all. Suggestions please!
Follow-up question: Where are the \\ and \\\ markups defined? They're
not in stdmarkup.php. If I could look at them for an example I'd be
home free!
Thanks in advance! --Ben
More information about the pmwiki-users
mailing list