// PukiWiki - Yet another WikiWikiWeb clone.
// default.ini.php
// Copyright
-// 2003-2018 PukiWiki Development Team
+// 2003-2022 PukiWiki Development Team
// 2001-2002 Originally written by yu-ji
// License: GPL v2 or (at your option) any later version
//
// ユーザ定義ルール(コンバート時に置換)
$line_rules = array(
'COLOR\(([^\(\)]*)\){([^}]*)}' => '<span style="color:$1">$2</span>',
- 'SIZE\(([^\(\)]*)\){([^}]*)}' => '<span style="font-size:$1px">$2</span>',
+ 'SIZE\((\d{1,2})\){([^}]*)}' => '<span style="font-size:$1px">$2</span>',
'COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)' => '<span style="color:$1">$2</span>',
- 'SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)' => '<span class="size$1">$2</span>',
+ // "SIZE(n):" PukiWiki 1.3 compatible notation
+ 'SIZE\(([1-7])\):((?:(?!SIZE\([^\)]+\)\:).)*)' => '<span class="size$1">$2</span>',
'%%%(?!%)((?:(?!%%%).)*)%%%' => '<ins>$1</ins>',
'%%(?!%)((?:(?!%%).)*)%%' => '<del>$1</del>',
"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
// PukiWiki - Yet another WikiWikiWeb clone.
// keitai.ini.php
// Copyright
-// 2002-2017 PukiWiki Development Team
+// 2002-2022 PukiWiki Development Team
// 2001-2002 Originally written by yu-ji
// License: GPL v2 or (at your option) any later version
//
// ユーザ定義ルール(コンバート時に置換)
$line_rules = array(
'COLOR\(([^\(\)]*)\){([^}]*)}' => '<font color="$1">$2</font>',
- 'SIZE\(([^\(\)]*)\){([^}]*)}' => '$2', // Disabled
+ 'SIZE\((\d{1,2})\){([^}]*)}' => '$2', // Disabled
'COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)' => '<font color="$1">$2</font>',
- 'SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)' => '$2', // Disabled
+ // "SIZE(n):" PukiWiki 1.3 compatible notation
+ 'SIZE\(([1-7])\):((?:(?!SIZE\([^\)]+\)\:).)*)' => '$2', // Disabled
'%%%(?!%)((?:(?!%%%).)*)%%%' => '<ins>$1</ins>',
'%%(?!%)((?:(?!%%).)*)%%' => '<del>$1</del>',
"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
// PukiWiki - Yet another WikiWikiWeb clone
// convert_html.php
// Copyright
-// 2002-2021 PukiWiki Development Team
+// 2002-2022 PukiWiki Development Team
// 2001-2002 Originally written by yu-ji
// License: GPL v2 or (at your option) any later version
//
parent::__construct();
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\((\d+)\)|(BOLD)):(.*)$/',
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\((\d{1,2})\)|(BOLD)):(.*)$/',
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower($matches[1]) . ';';