diff --git a/include/bbcode.php b/include/bbcode.php
index 0c85a0a4e..86fd24696 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -628,7 +628,7 @@ function bb_code_unprotect_sub($match) {
function bb_code($match) {
if(strpos($match[0], "
"))
- return '' . bb_code_protect(trim($match[1])) . '
';
+ return '
' . bb_code_protect(trim($match[1])) . '
';
else
return '' . bb_code_protect(trim($match[1])) . '
';
}
@@ -636,15 +636,21 @@ function bb_code($match) {
function bb_code_options($match) {
if(strpos($match[0], "' . bb_code_protect(trim($match[2])) . '
';
+ if($pre) {
+ return '' . bb_code_protect(trim($match[2])) . '
';
+ } else {
+ return '' . bb_code_protect(trim($match[2])) . '
';
+ }
}
function bb_highlight($match) {
diff --git a/view/css/mod_wiki.css b/view/css/mod_wiki.css
index 4e4c71e1d..e0b02b414 100644
--- a/view/css/mod_wiki.css
+++ b/view/css/mod_wiki.css
@@ -48,3 +48,24 @@ td i {
padding-right: 10px;
}
+pre code {
+ background: #F5F5F5;
+ font-family: Courier, monospace;
+ font-size: 1em;
+ padding: 1em 1.5em;
+ display: block;
+ white-space: pre-wrap;
+}
+
+code {
+ background: #F5F5F5;
+ font-family: Courier, monospace;
+ font-size: 1em;
+ display: inline;
+ padding: 0.2em 0.2em;
+ white-space: pre-wrap;
+}
+
+#wiki-content-container code {
+ background: #F5F5F5;
+}
\ No newline at end of file