Line breaks in text enclosed in code tags.....
#1
If I enclose a piece of text in code tags I expect the following:
1) The rendering on the client should use a mono-spaced font (like Courier new)
2) Each line should be displayed as-is with no extra line-feeds or indents added

On this forum I have discovered when I posted in a recent thread and added the response to a few commands in a code tagged section the displayed text was broken at some white space into twice as many lines as was intended!

By expanding the FireFox window horizontal size I could make the data appear as it should on a single line, but this will not work if the lines are long enough!

In such a case other forums I visit will add a scroll-bar to the bottom of the code frame so that one can see the part of the lines not available inside the window.
This is how it should be because some languages (I believe python is one example) are very sensitive to indentations and the code will execute outright erroneous if these are wrong.
So someone cutting and pasting from a code window will probably get the wrong code and the code itself becomes very difficult to read with the random extra line feeds too.

Could this be corrected on this forum to the standard way of operation, please?
Bo Berglund
Sweden
Reply


Messages In This Thread
Line breaks in text enclosed in code tags..... - by Bosse_B - 2014-06-09, 10:50
Logout Mark Read Team Forum Stats Members Help
Line breaks in text enclosed in code tags.....0