Forum Moderators: open

Message Too Old, No Replies

Have never been able to get [code] or [pre] to work on WW

The first line or two show up monospaced, the rest don't

         

MichaelBluejay

2:15 am on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I post a fair bit of code here on WW but I've never been able to get the [ code ] and [ pre ] tags to work. Maybe the first line or two will be monospaced but the rest of the lines will look just like an unformatted post. I'd really, really like a way to preserve spaces so I can indent code. Is there some trick to it?

Thankie-doodle, -MBJ-

sidyadav

12:27 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


> I'd really, really like a way to preserve spaces so I can indent code. Is there some trick to it?

Yes, you can use the [ul] tag to indent, but make sure you end it with [/ul].

For more information on codes, if you haven't already, see:
http://www.webmasterworld.com/help.cgi?cat=ubbcodes

Sid

DrDoc

4:05 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



code and pre work great as long as there are no blank lines.

Compare the following:



Using pre... 
No blank line



Using pre... 

Blank line




Using code...
No blank line



Using code...

Blank line

DrDoc

4:09 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


There are, however, ways around the above. Simply putting ANYTHING on the blank line (no matter if it is printable or not) solves the problem:

[pre]Using pre...
[b][/b]
Blank line...[/pre]

[pre]Using pre...
[smilestopper]
Blank line...[/pre]

[code]Using code...
[b][/b]
Blank line...[/code]

[code]Using code...
[smilestopper]
Blank line...[/code]

MichaelBluejay

7:20 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ah, the blank lines kill it. Thanks!

This explanation really should go on the Codes page.