How to get code formatted reliably?

Hi,

see my post Straight forward way for infinitescroll on magento?
half of the code is not posted as code, but I clicked the icon, also tried indenting myself…?!

regards
Alex

You should be able to denote your code blocks by using 4 backticks before and after the block of code.

I’m curious: is this the method you tried to mark your code blocks with?

Hm, i just pressed the Preformatted Text button (6th from left) while marking the code part. Will try the backticks now

I added the backticks. They result in an empty line, nothing changed…

It looks like in your reply to the message, you got the code block to be formatted correctly. Did you do anything different in that second message?

I used a trial and error appoach.
Honeystly, I think there are some bugs. I’d expect that I can take any code, paste it here, select proper formating. One is, that there needs to be an empty line between normal text and code. This should not be needed or inserted automatically

1 Like