Merge pull request #154 from dgz/fix-wordwrap
Fix issue #62: wordwrap in CSS rather than PHP
This commit is contained in:
commit
a0d8f20dbc
@ -25,10 +25,6 @@
|
|||||||
|
|
||||||
class BBCode extends FormatterExtension {
|
class BBCode extends FormatterExtension {
|
||||||
public function format(/*string*/ $text) {
|
public function format(/*string*/ $text) {
|
||||||
global $config;
|
|
||||||
if($config->get_bool("word_wrap", true)) {
|
|
||||||
$text = wordwrap($text, 80, " ", true);
|
|
||||||
}
|
|
||||||
$text = preg_replace_callback("/(\[img\]https?:\/\/.*?\[\/img\])/s", array($this, "unwrap"), $text);
|
$text = preg_replace_callback("/(\[img\]https?:\/\/.*?\[\/img\])/s", array($this, "unwrap"), $text);
|
||||||
$text = preg_replace_callback("/(\[url=(?:https?|ftp|irc|mailto):\/\/.*?\])/s", array($this, "unwrap"), $text);
|
$text = preg_replace_callback("/(\[url=(?:https?|ftp|irc|mailto):\/\/.*?\])/s", array($this, "unwrap"), $text);
|
||||||
$text = preg_replace_callback("/(\[url\](?:https?|ftp|irc|mailto):\/\/.*?\[\/url\])/s", array($this, "unwrap"), $text);
|
$text = preg_replace_callback("/(\[url\](?:https?|ftp|irc|mailto):\/\/.*?\[\/url\])/s", array($this, "unwrap"), $text);
|
||||||
@ -75,10 +71,6 @@ class BBCode extends FormatterExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function strip(/*string*/ $text) {
|
public function strip(/*string*/ $text) {
|
||||||
global $config;
|
|
||||||
if($config->get_bool("word_wrap", true)) {
|
|
||||||
$text = wordwrap($text, 80, " ", true);
|
|
||||||
}
|
|
||||||
$text = preg_replace("/\[b\](.*?)\[\/b\]/s", "\\1", $text);
|
$text = preg_replace("/\[b\](.*?)\[\/b\]/s", "\\1", $text);
|
||||||
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text);
|
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text);
|
||||||
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text);
|
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text);
|
||||||
|
@ -144,6 +144,7 @@ UL {
|
|||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 1%;
|
height: 1%;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
#body TABLE {
|
#body TABLE {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user