Upvote Upvoted 1 Downvote Downvoted
[code] tag doesn't preserve indents
posted in Bug Reports
1
#1
0 Frags +

preformatted text (like, code!) breaks

indented
    with
        spaces
indented
	with
		tabs
preformatted text (like, code!) breaks
[code]
indented
with
spaces
[/code]
[code]
indented
with
tabs
[/code]
2
#2
0 Frags +

http://teamfortress.tv/forum/thread/2969-how-to-get-rid-of-the-calls-picture-health-cross/1#post-41792

:[

http://teamfortress.tv/forum/thread/2969-how-to-get-rid-of-the-calls-picture-health-cross/1#post-41792

:[
3
#3
1 Frags +

Currently, the HTML structure for these blocks is:

<code>blah<br />
blah<br />
blah</code>

A solution would be: (of course, doing this in the style sheet is a better idea.)

<code style="white-space: pre;">blah
blah
blah</code>

Or, alternatively:

<code><pre>blah
blah
blah</pre></code>

Basically, anything to let the rendering engine know that the code is pre-formatted should leave the white space intact.

Of course, make sure to remove any line breaks nested between the code tags.

Currently, the HTML structure for these blocks is:
[code]<code>blah<br />
blah<br />
blah</code>[/code]

A solution would be: (of course, doing this in the style sheet is a better idea.)
[code]<code style="white-space: pre;">blah
blah
blah</code>[/code]

Or, alternatively:
[code]<code><pre>blah
blah
blah</pre></code>[/code]

Basically, anything to let the rendering engine know that the code is pre-formatted should leave the white space intact.

Of course, make sure to remove any line breaks nested between the code tags.
4
#4
0 Frags +

Actually, I found out that pre-wrap; works better than pre; because it allows text to wrap, which means that it doesn't overflow past the edge of the screen forever.

Actually, I found out that pre-wrap; works better than pre; because it allows text to wrap, which means that it doesn't overflow past the edge of the screen forever.
Please sign in through STEAM to post a comment.