Extension:BacktickCode

The BacktickCode extension wraps &lt;code> tags around wikitext which is placed `between backtick characters`.

This provides a handy wiki-editing shortcut for wikis that expect a lot of inlined &lt;code> snippets in its pages, and functions similarly to the standard MediaWiki ''' -> &lt;b> bold formatting shortcut.

Backtick characters within &lt;pre> blocks will not be altered by this extension. Backticks outside of &lt;pre> blocks can also be output to the page by escaping them as \</tt>`</tt>.

Code

 * There is a newer code which is compatable with Mediawiki 1.27 at the Discussion page Extension_talk:BacktickCode

' and '\`' by '`'. $text = preg_replace('/([^\\\\]|^)`([^`]*)`/', '$1 ', $text); $text = preg_replace('/\\\\\`/', '`', $text);
 * BacktickCode.php (PHP 5.3+)

return true; }

' and '\`' by '`'. $text = preg_replace('/([^\\\\]|^)`([^`]*)`/', '$1 ', $text); $text = preg_replace('/\\\\\`/', '`', $text);
 * BacktickCode.php (PHP 5.2+)

return true; }

Credits
This extension is derived from Extension:DollarSign.