I want a Markup() call to apply only to a given type of page, specifically if (:sop:) is included on a wiki page. The Markup will affect section numbering, but I still need the standard section markup to be used.<div><br>
</div><div>The following input:<div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">!! Section 1<br>!!! Section 1.1<br></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<br></blockquote><div><div><div><div>will result in the following output:</div><div><br></div></div></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">1 Section 1<br>
<br> 1.1 Section 1.1</blockquote><div><div><div><div><br></div><div><br></div><div>Loading the file in which this is defined via config.php results in the section formatting being changed for all pages. I tried the following, and checked using ?action=ruleset whether the 'sop' rule was being applied; 'sopheaders' is being applied, but 'sop' is not.</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">/*</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">function SOPheaders(){</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family: 'courier new', monospace;">        </span></span><span class="Apple-style-span" style="font-family: 'courier new', monospace;">Markup('sop','>include','/^(!{2,4})(?:\s*)(.*)$/e', "MkSopNumTitle(strlen('$1'),PSS('$2'))");</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family: 'courier new', monospace;">        </span></span><span class="Apple-style-span" style="font-family: 'courier new', monospace;">}</span></div>
<div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">Markup('sopheaders','directives','/\\(:sop:\\)/e',"SOPheaders()");</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">*/</span></div>
<br></div><div>Is this the right approach? Is there another approach I can try?</div><div><br></div><div>Thanks.</div><div>Scott D.</div></div></div>