Reply to post: "pre" tag not working as expected

"pre" tag not working as expected

User McUser

"pre" tag not working as expected

Should not the "pre" tag preserve the spacing and carriage returns of the text inside it as-entered? As implemented right now it seems it only changes the font face to a monospaced one.

Here's a test:

Line one.

Line two.

1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9

The first two lines should be single spaced with one blank line between "Line two." and the first line of numerals.

The first line of numerals has a single space character between each one and the second has two space characters between each one.

EDIT: I see that when I edit my post after submitting it that the extra "linefeeds" are included in the comment editing box and the extra space characters have been discarded. So the issue would seem to be due to the parsing of the posts by the system when it no doubt sanitizes them against Johnny Droptable style chicanery.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2022