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

BackTick/BackQuote/Grave seems to work in MediaWiki out of the box

This Code works for me

 * This didn't work for me, I still got QINU, until I removed the require_once in LocalSetting --JimmyRoxburgh (talk) 03:15, 19 August 2016 (UTC)
 * Update: Actually it stop replace backticks, so i put the require_once back in - and it is now working, no QINU. I suspect a rebuildall helped --JimmyRoxburgh (talk) 00:19, 23 August 2016 (UTC)

', $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."); }