sub CommonMarkup { ... s/\{\{(#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{3})\s+(.*?)\}\}/'<span style="color:' . $1 . '">' . $2 . '<\/span>'/gei; s/\{\{([0-9]+%)\s+(.*?)\}\}/'<span style="font-size:' . $1 . '">' . $2 . '<\/span>'/ge; ... }
Markup:
Examples
I hope doing well with the regexps. --JuanmaMP