diff --git a/include/layout.inc b/include/layout.inc
index 14d6d3607d..7378d66ec1 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -20,26 +20,14 @@ function highlight_php($code, $return = false)
}
// Fix output to use CSS classes and wrap well
- $highlighted = '
' . str_replace(
+ $highlighted = '
' . strtr(
+ $highlighted,
[
- ' ',
- '
',
- '\n",
- ' ' ',
+ "\n" => '',
+
+ '';
if ($return) { return $highlighted; }
diff --git a/manual/add-note.php b/manual/add-note.php
index 72d931bfac..e05a191da3 100644
--- a/manual/add-note.php
+++ b/manual/add-note.php
@@ -190,11 +190,7 @@
-
-
- eval() is the best for all sorts of things
-
-
+
eval() is the best for all sorts of things
@@ -220,11 +216,7 @@
-
-
- If eval() is the answer, you're almost certainly asking the wrong question.
-
-
+
If eval() is the answer, you're almost certainly asking the wrong question.
@@ -250,11 +242,7 @@
-
-
- egg bacon sausage spam spam baked beans
-
-
+
egg bacon sausage spam spam baked beans
diff --git a/styles/theme-base.css b/styles/theme-base.css
index 69866024a2..01164945cb 100644
--- a/styles/theme-base.css
+++ b/styles/theme-base.css
@@ -1325,10 +1325,10 @@ div.tip p:first-child {
margin-bottom: 1.5rem;
}
-.docs .phpcode code {
+.phpcode code {
display: block;
overflow-x: auto;
- white-space: pre;
+ white-space: pre-wrap;
}
.docs .qandaentry dt .phpcode * {