mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Properly handle whitespace in PHP examples
PhD no longer renders NBSPs, but regular spaces instead[1]. To retain
the desired indentation, we set the CSS propery `white-space:pre`.
However, we cannot do that for the `.phpcode` class directly, because
`highlight_string()` emits additional line breaks at the top and the
bottom of the examples, so we use a more specific selector to avoid
this "padding".
[1] <87f794bafe>
This commit is contained in:
@@ -1324,6 +1324,10 @@ div.tip p:first-child {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.phpcode code span span {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user