<div class="gmail_quote">On Mon, Feb 9, 2009 at 7:00 PM, Scott Diegel <span dir="ltr">&lt;<a href="mailto:scottdiegel@gmail.com">scottdiegel@gmail.com</a>&gt;</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&#39;ve managed to get the result I want by editing the return value of MkSopNumTitle based on whether or not &quot;(:sop:)&quot; was found. &nbsp;I still think it seems reasonable to allow &quot;Markup()&quot; in a &quot;Markup()&quot;.</div>

<div></div></blockquote><div><br>Glad you got it working.&nbsp; <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 &quot;just right&quot; for the system to work.&nbsp; And the order of them is hugely (!) important.&nbsp; I&#39;m not too surprised that inserting a markup late (during page processing) doesn&#39;t take effect.&nbsp; 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.&nbsp; (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&#39;s the change in pmwiki.php.&nbsp; Then in your SopHeader() function you would call your Markup() and then say &quot;$markrules = BuildMarkupRules();&quot; and then increment $RedoMarkupLine.&nbsp; (Obviously making sure that $markrules and $RedoMarkupLine are globals.)<br>
<br>I&#39;ll close now so 10 people can post explaining why that&#39;s a really bad idea.&nbsp; It really is a bad idea to alter pmwiki.php.&nbsp; You shouldn&#39;t do it.&nbsp; I didn&#39;t do it even to test the dirty hack.&nbsp; So probably even if you did do it it wouldn&#39;t work.&nbsp; That&#39;s how bad an idea it is... :-)<br>
<br>-Peter<br><br>&nbsp;<br></div></div>