<div class="gmail_quote">On Mon, Feb 9, 2009 at 7:00 PM, Scott Diegel <span dir="ltr"><<a href="mailto:scottdiegel@gmail.com">scottdiegel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I've managed to get the result I want by editing the return value of MkSopNumTitle based on whether or not "(:sop:)" was found. I still think it seems reasonable to allow "Markup()" in a "Markup()".</div>
<div></div></blockquote><div><br>Glad you got it working. <br><br>Note that the markup rules in pmwiki are the inner DNA structure of the whole system and thus have to be set up "just right" for the system to work. And the order of them is hugely (!) important. I'm not too surprised that inserting a markup late (during page processing) doesn't take effect. I looked into manipulating things via BuildMarkupRules() or incrementing $RedoMarkupLine but unfortunately (or perhaps fortunately?) $markrules is local to MarkupToHTML() and so inaccessible for this type of manipulating. (It would have been an ugly hack anyways...)<br>
<br>If you really wanted to do said ugly hack and were willing to edit your pmwiki.php (something that is strongly recommended against for very good reasons) you could make $markrules a global in MarkupToHTML() -- that's the change in pmwiki.php. Then in your SopHeader() function you would call your Markup() and then say "$markrules = BuildMarkupRules();" and then increment $RedoMarkupLine. (Obviously making sure that $markrules and $RedoMarkupLine are globals.)<br>
<br>I'll close now so 10 people can post explaining why that's a really bad idea. It really is a bad idea to alter pmwiki.php. You shouldn't do it. I didn't do it even to test the dirty hack. So probably even if you did do it it wouldn't work. That's how bad an idea it is... :-)<br>
<br>-Peter<br><br> <br></div></div>