config.php: use modern array syntax for markup

This commit is contained in:
Zankaria 2024-10-14 00:26:59 +02:00
parent f86f1c344b
commit acf358b157

View file

@ -743,14 +743,16 @@
* ====================
*/
// Dice Roll Markup.
$config['markup'][] = [ "/!([-+]?\d+)?([d])([-+]?\d+)([-+]\d+)?/iu", fn($m) => handle_dice_roll_markup($m, 'static/d10.svg') ];
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
$config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
$config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
$config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>");
$config['markup'][] = array("/==(.+?)==/", "<span class=\"heading\">\$1</span>");
$config['markup'] = [
// Dice Roll Markup.
[ "/!([-+]?\d+)?([d])([-+]?\d+)([-+]\d+)?/iu", fn($m) => handle_dice_roll_markup($m, 'static/d10.svg') ],
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
[ "/'''(.+?)'''/", "<strong>\$1</strong>" ],
[ "/''(.+?)''/", "<em>\$1</em>" ],
[ "/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>" ],
[ "/==(.+?)==/", "<span class=\"heading\">\$1</span>" ]
];
// Code markup. This should be set to a regular expression, using tags you want to use. Examples:
// "/\[code\](.*?)\[\/code\]/is"