Markup Syntax ============= Since v0.9.6, Tinyboard’s markup syntax has become customizable. `$config['markup']` is an array of markup rules. Each markup rule is an array containing a regular expression for matching the text, and a replacement which can either be a string (using `$*` references), or a callback. The input has already been HTML-escaped. Defaults -------- ### Code ```php $config['markup'][] = array("/'''(.+?)'''/", "\$1"); $config['markup'][] = array("/''(.+?)''/", "\$1"); $config['markup'][] = array("/\*\*(.+?)\*\*/", "\$1"); $config['markup'][] = array("/^\s*==(.+?)==\s*$/m", "\$1"); ``` ### Translation (Of course this isn’t exactly how it will look.) Input | Output --------------- | ------ `''text''` | `text` `'''text'''` | `text` `**text**` | `text` `==text==` | `text` Examples -------- ### Standard ```php $config['markup'][] = array("/<3/", "♥"); ``` Input | Output ----- | ------ `<3` | ♥ ### Callback Callbacks can be used for more advanced markup. ```php $config['markup'][] = array( '/MD5<(.+)>/', function($matches) { return md5($matches[1]); } ); ``` Input | Output ----------- | ------ `MD5` | 098f6bcd4621d373cade4e832627b4f6 See also -------- * [Configuration Basics](../config.md)