bbcode sup and sub

This commit is contained in:
friendica 2014-08-05 04:32:48 -07:00
parent 004eaacc73
commit 8b1f9b1425
2 changed files with 8 additions and 1 deletions

View File

@ -502,6 +502,13 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
if (strpos($Text,'[o]') !== false) { if (strpos($Text,'[o]') !== false) {
$Text = preg_replace("(\[o\](.*?)\[\/o\])ism",'<span class="overline">$1</span>',$Text); $Text = preg_replace("(\[o\](.*?)\[\/o\])ism",'<span class="overline">$1</span>',$Text);
} }
if (strpos($Text,'[sup]') !== false) {
$Text = preg_replace("(\[sup\](.*?)\[\/sup\])ism",'<sup>$1</sup>',$Text);
}
if (strpos($Text,'[sub]') !== false) {
$Text = preg_replace("(\[sub\](.*?)\[\/sub\])ism",'<sub>$1</sub>',$Text);
}
// Check for colored text // Check for colored text
if (strpos($Text,'[/color]') !== false) { if (strpos($Text,'[/color]') !== false) {
$Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","<span style=\"color: $1;\">$2</span>",$Text); $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","<span style=\"color: $1;\">$2</span>",$Text);

View File

@ -1 +1 @@
2014-08-04.757 2014-08-05.758