Extension talk:BacktickCode

Adaptation notes
I adapted this extension for the ConTeXt wiki, so that it would also leave alone backticks inside  and  tags. Things to take into account when adapting:


 * The current regex is case-sensitive: f.ex. is matched and backticks inside it are ignored; if the tag is written, this does not happen..
 * The current regex does not match tags with attributes. We discovered this when our adapted version properly matched and ignored the contents of tags, but did not ignore backticks inside.

Adapted code that allows tag attributes (but is still case-sensitive): --Sietse (talk) 22:39, 30 May 2013 (UTC)

Compatibility with Mediawiki 1.27.0
For some reason this extension will not work with Mediawiki version 1.27.0,
 * when used, all text is will be garbled with "uniq" (prefix) "qinu" (suffix).
 * seems to be a parsing problem:


 * https://www.mediawiki.org/wiki/QINU_fix
 * https://www.mediawiki.org/wiki/Thread:Extension_talk:Favorites/UNIQ...QINU_parser_problem

This Code works for me
', $text);       $text = preg_replace('/\\\\\`/', '`', $text);    }

}

// Running MediaWiki? if ( defined( 'MEDIAWIKI' ) ) {   // Register our MediaWiki parser hooks $wgHooks['ParserBeforeStrip'][] = 'BacktickCode::onParserBeforeStrip';

} // End MediaWiki env else {   die("This is an extension to the MediaWiki package and cannot be run standalone."); }