https://github.com/phpbb/phpbb/pull/3625
The
code
BBCode doesn't really support tabs. It actually replaces them with a mix of spaces and
. The obvious fix is to wrap the code block in a <pre>
block. Inside <pre>
, new lines are preserved and line breaks are unnecessary. Also, <pre>
doesn't produce a blank line for the first line of the block. However, <pre><code>
does. That means this:
Code: Select all
[cοde]
line 1
line 2
[/cοde]
Code: Select all
<pre><code>
line 1
line 2
</code></pre>
<code>
element, or manually removing the first blank line from code blocks in PHP. Does anybody have a better idea?