Why are BBCode Code blocks inserting a space at the start?

The below screenshot from Difference between [], {} and () expressions?.

Why does the first line of code start with a space whereas the BBCode Code block doesn’t?

This is the actual code of that post: https://gist.github.com/jpluimers/c19d34e243be16855078be35aa6ac782

–jeroen

Maybe you can try to ask in PHPBB forums :slight_smile: We did not change the forum engine, and it has tons of issues of all kind.

Thanks, I will.
What version of PHBB are you running? (so they know where to fix, if at all).

Reminder: please mention the PHPBB version, as I cannot query it as end user (see https://www.phpbb.com/community/viewtopic.php?f=46&t=1394485 )

That way I can report the spacing issue with PHPBB.

–jeroen

I noticed that we are a few versions behind, we will upgrade and see if this is solved, if not, you will be able to report that we have the newest :wink:

We are now on latest 3.1.9

No idea why, but regular HTML does not start with a space, only other stuff does

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>

Thanks.

Is everyone using the same Theme (see also my other question about printing and the Style SheetsBug: Printing forum messages gets grey background).

(I’ve no experience with PHPBB, but a lot of software development experience, so the sooner you help me up to speed, the easier I can report stuff)

–jeroen

Funny, a few weeks ago I was about to post about why the BBCode Code box is so horrible. But I got sidetracked when trying to figure out how the CSS for it even worked.

Can we please get a better Code box? One that is maybe actually a box with a background color?

I guess that MikroTik script/terminal syntax would be too hard to implement, but some syntax highlight would be nice if at all possible.