Formatting code blocks and output blocks in the Forums

2 replies [Last post]
Steve's picture
Offline
Joined: 07/30/2009

I am wondering if we should come to a consensus about how to format code blocks and output blocks as we post them to the forums.

It seems to me that it would be nice to choose a format that would automatically preserve text spacing and tabs so that things don't become left justified when we want them indented. It would also be nice if a fixed pitch font were chosen. I don't think we need to go as far as syntax coloring. But if the block were highlighted in some way, that would be useful.

All you html gurus out there, what do you think would work best?

tbates's picture
Online
Joined: 07/31/2009
I think if we just add <pre>

I think if we just add <pre>

at the beginning 
    of code
       then white
       space;
    is preserved
nicely

And then </pre> to get back to normal run on left falling text

Steve's picture
Offline
Joined: 07/30/2009
Looks good. We should

Looks good. We should recommend this for both code and for output.