diff --git a/rebuild.php b/rebuild.php
index 967d50f..19ebb9b 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -139,7 +139,11 @@ function text2html($sz) {
$btparts = explode('`', $base);
if (count($btparts) > 1 && (count($btparts) % 2)) {
for ($i = 1, $e = count($btparts); $i < $e; $i += 2) {
- $btparts[$i] = ''.$btparts[$i].'';
+ $class = 'code';
+ if (strpos($btparts[$i], "\n") !== false) {
+ $class .= ' code-multiline';
+ }
+ $btparts[$i] = ''.$btparts[$i].'';
}
}
diff --git a/sites/code.ivysaur.me/static/style.css b/sites/code.ivysaur.me/static/style.css
index 2ed1c0a..de14bb5 100644
--- a/sites/code.ivysaur.me/static/style.css
+++ b/sites/code.ivysaur.me/static/style.css
@@ -29,6 +29,11 @@ h1,h2,h3 {
font-family:Consolas,monospace;
white-space:pre;
}
+.code-multiline {
+ display:inline-block;
+ padding:8px;
+ border-radius:8px;
+}
/* */