*表組みでnowrapを指定する [#x7f7363d]
-[[official:続・質問箱/301]]
**使い方 [#u03b6fd5]
|NOWRAP:改行したくない内容|
**差分 [#xc3cae0a]
- convert_html.php,v 1.18だとこんな感じ? -- &new{2007-05-24 (木) 11:45:24};
convert_html.php
@@ -489,18 +489,21 @@
parent::Element();
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\((\d+)\)):(.*)$/',
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\((\d+)\)|(NOWRAP)):(.*)$/',
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower($matches[1]) . ';';
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[3]) {
$name = $matches[2] ? 'background-color' : 'color';
$this->style[$name] = $name . ':' . htmlspecialchars($matches[3]) . ';';
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[4]) {
$this->style['size'] = 'font-size:' . htmlspecialchars($matches[4]) . 'px;';
- $text = $matches[5];
+ $text = $matches[6];
+ } else if ($matches[5]) {
+ $this->style['white-space'] = 'white-space:nowrap;';
+ $text = $matches[6];
}
}
if ($is_template && is_numeric($text))
**コメント [#k6f9457c]
- NOWRAPの本体への取込みを希望します -- &new{2007-08-06 (月) 18:56:20};
- この方法で出来ました! できれば、取り込み希望です。 -- &new{2013-06-17 (月) 10:33:23};
- 関連: TOP:, MIDDLE:, BOTTOM: の書式を追加する方法 → [[official:質問箱4/540]] -- &new{2013-06-17 (月) 18:41:31};
#comment