From 38686d9523084eb155926470745da46a34bfd460 Mon Sep 17 00:00:00 2001 From: panda Date: Mon, 2 Dec 2002 11:50:26 +0900 Subject: [PATCH] =?utf8?q?=E3=81=B1=E3=82=93=E3=81=A0:[[BugTrack/80]]?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- html.php | 23 +++++++++++++++++++---- pukiwiki.ini.php | 5 +---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/html.php b/html.php index 8a5031d..a00f0d5 100644 --- a/html.php +++ b/html.php @@ -1,6 +1,6 @@ "); foreach($arytable as $td) { - array_push($result,""); + if (preg_match("/^(LEFT|CENTER|RIGHT):(.*)$/",$td,$tmp)) { + $style = ' align="'.strtolower($tmp[1]).'"'; + $td = $tmp[2]; + } else { + $style = ''; + } + array_push($result,""); array_push($result,ltrim(inline($td))); array_push($result,""); } @@ -292,8 +298,17 @@ function convert_html($string) $_p = FALSE; } else if( substr($line,0,1) != '' && !$_p) { - array_push($result, "

"); - $_p = TRUE; + if (preg_match("/^(LEFT|CENTER|RIGHT):(.*)$/",$line,$tmp)) { + if ($tmp[2] != '') { + array_push($result,'

'); + array_push($result,inline($tmp[2])); + array_push($result,"

"); + $line = ''; + } + } else { + array_push($result, "

"); + $_p = TRUE; + } } if( substr($line,0,1) != '' ){ array_push($result, inline($line)); diff --git a/pukiwiki.ini.php b/pukiwiki.ini.php index 7b7a60b..48b80ab 100644 --- a/pukiwiki.ini.php +++ b/pukiwiki.ini.php @@ -2,7 +2,7 @@ ///////////////////////////////////////////////// // PukiWiki - Yet another WikiWikiWeb clone. // -// $Id: pukiwiki.ini.php,v 1.14 2002/11/29 00:09:00 panda Exp $ +// $Id: pukiwiki.ini.php,v 1.15 2002/12/02 02:50:26 panda Exp $ // // PukiWiki setting file @@ -205,9 +205,6 @@ $line_rules = array( "SIZE\(([^\(\)]*)\){([^}]*)}" => "\\2", "COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)" => "\\2", "SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)" => "\\2", -"LEFT:((?:(?!LEFT\:).)*)" => "

\\1
", -"CENTER:((?:(?!CENTER\:).)*)" => "
\\1
", -"RIGHT:((?:(?!RIGHT\:).)*)" => "
\\1
", "%%((?:(?!%%).)*)%%" => "\\1", "'''((?:(?!''').)*)'''" => "\\1", "''((?:(?!'').)*)''" => "\\1", -- 2.11.0