From acf358b157a69b6dae0dda7cedbaa1c641995643 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Mon, 14 Oct 2024 00:26:59 +0200 Subject: [PATCH] config.php: use modern array syntax for markup --- inc/config.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/inc/config.php b/inc/config.php index 16b14413..ec73226d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -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("/'''(.+?)'''/", "\$1"); - $config['markup'][] = array("/''(.+?)''/", "\$1"); - $config['markup'][] = array("/\*\*(.+?)\*\*/", "\$1"); - $config['markup'][] = array("/==(.+?)==/", "\$1"); + $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): + [ "/'''(.+?)'''/", "\$1" ], + [ "/''(.+?)''/", "\$1" ], + [ "/\*\*(.+?)\*\*/", "\$1" ], + [ "/==(.+?)==/", "\$1" ] + ]; // Code markup. This should be set to a regular expression, using tags you want to use. Examples: // "/\[code\](.*?)\[\/code\]/is"