Created
June 27, 2013 10:45
-
-
Save yellowback/5875565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php | |
index 8c9aac1..6460d01 100644 | |
--- a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php | |
+++ b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php | |
@@ -54,7 +54,9 @@ class serendipity_event_bbcode extends serendipity_event | |
function bbcode_callback($matches) { | |
$type = $matches[1]; | |
- $input = trim($matches[2], "\r\n"); | |
+ $input = str_replace("<br />\r\n","foobarbaz123454321",$matches[2]); | |
+ $input = trim($input, "\r\n"); | |
+# $input = trim($matches[2], "\r\n"); | |
switch ($type) { | |
case 'code': | |
@@ -90,15 +92,16 @@ class serendipity_event_bbcode extends serendipity_event | |
$input = ob_get_contents(); | |
ob_end_clean(); | |
- $input = str_replace('<br />', "\n", $input); | |
+# $input = str_replace('<br />', "\n", $input); | |
break; | |
default: | |
return false; | |
} | |
- $input = "<div class=\"bb-$type-title\">" . strtoupper($type) . ":</div>" | |
- . "<div class=\"bb-$type\">$input</div>"; | |
+ $input = str_replace("foobarbaz123454321","\n",$input); | |
+ | |
+ $input = "<div class=\"bb-$type\">$input</div>"; | |
return($input); | |
} | |
@@ -262,6 +265,9 @@ class serendipity_event_bbcode extends serendipity_event | |
margin-right: 20px; | |
color: black; | |
direction: ltr; | |
+ max-width: 600px; | |
+ max-height: 300px; | |
+ overflow: auto; | |
} | |
.bb-code-title, .bb-php-title { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment