<p>I created a few mediawiki custom tags, using the guide found here</p>

<p><a href="http://www.mediawiki.org/wiki/Manual:Tag_extensions" rel="nofollow noreferrer">http://www.mediawiki.org/wiki/Manual:Tag_extensions</a></p>

<p>I will post my code below, but the problem is after it hits the first custom tag in the page, it calls it, and prints the response, but does not get anything that comes after it in the wikitext. It seems it just stops parsing the page.</p>

<p>Any Ideas?</p>

<pre><code>if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
     $wgHooks['ParserFirstCallInit'][] = 'tagregister';
} else { // Otherwise do things the old fashioned way
     $wgExtensionFunctions[] = 'tagregister';
}

function tagregister(){
  global $wgParser;
  $wgParser-&gt;setHook('tag1','tag1func');
  $wgParser-&gt;setHook('tag2','tag2func');
  return true;
}

function tag1func($input,$params)
{
  return "It called me";
}

function tag2func($input,$params)
{
  return "It called me -- 2";
}
</code></pre>

<p>Update: @George Mauer --  I have seen that as well, but this does not stop the page from rendering, just the Mediawiki engine from parsing the rest of the wikitext. Its as if hitting the custom function is signaling mediawiki that processing is done. I am in the process of diving into the rabbit hole but was hoping someone else has seen this behavior.</p>

[{'answer_id': 49887, 'author': 'Pierre Spring', 'author_id': 1532, 'author_profile': 'https://Stackoverflow.com/users/1532', 'pm_score': 2, 'selected': False, 'text': '<p>You can do this, using <code>xsl:sort</code>. It is important to set the <code>data-type="number"</code> because else, the position will be sorted as a string, end therefor, the 10th node would ge considered before the 2nd one.</p>\n\n<pre><code>&lt;xsl:template match="/"&gt;\n    &lt;xsl:apply-templates select="root/node"&gt;\n        &lt;xsl:sort \n            select="position()" \n            order="descending" \n            data-type="number"/&gt;\n    &lt;/xsl:apply-templates&gt;\n&lt;/xsl:template&gt;\n&lt;xsl:template match="node"&gt;\n    &lt;xsl:value-of select="."/&gt;\n&lt;/xsl:template&gt;\n</code></pre>\n'}, {'answer_id': 49893, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 6, 'selected': True, 'text': '<p>Easy!</p>\n\n<pre><code>&lt;xsl:template match="/"&gt;\n    &lt;xsl:apply-templates select="root/node"&gt;\n        &lt;xsl:sort select="position()" data-type="number" order="descending"/&gt;\n    &lt;/xsl:apply-templates&gt;\n&lt;/xsl:template&gt;\n\n&lt;xsl:template match="node"&gt;\n    &lt;xsl:value-of select="."/&gt;\n&lt;/xsl:template&gt;\n</code></pre>\n'}, {'answer_id': 50015246, 'author': 'imran', 'author_id': 9665536, 'author_profile': 'https://Stackoverflow.com/users/9665536', 'pm_score': 0, 'selected': False, 'text': '<pre><code>&lt;xsl:template match="/"&gt;\n        &lt;xsl:apply-templates select="root/node[3]"/&gt;\n        &lt;xsl:apply-templates select="root/node[2]"/&gt;\n        &lt;xsl:apply-templates select="root/node[1]"/&gt;\n    &lt;/xsl:template&gt;\n    &lt;xsl:template match="node"&gt;\n        &lt;xsl:value-of select="."/&gt;\n    &lt;/xsl:template&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/49890', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/673/']