-2

IMHO serverfault shoul support yet another format for quoting code/logs: numbered lines with line breaks. It would allow to see whole lines without horizontal scrolling with preserved important information about original line breaks.

1:  line-1A
    line-1B
    line-1C
2:  line-2A
    line-2B
| |
4

This seems like a Bad Idea to me - at least if it's intended to replace the existing code block format.

My main objection is it breaks the ability to cut and paste from a code block to your terminal: If you cut and paste something with the above formatting it is virtually guaranteed NOT to work (it can be "fixed" of course, but reassembling the original text would require at minimum some scripting. That's asking a lot of people...).

My secondary objection is that without a quantum leap in AI technology it's impossible to intelligently break lines in all of the possible "stuff" that gets put in code blocks: Doing so requires context awareness that the site doesn't have ("Is this a log file? An error message? A C program? A shell script? Python? Perl? Ruby?")


The Right Thing (IMHO) is for whoever is posting this data to properly format it for us (break long lines themselves). This isn't that much effort - I'd say it's the minimum we should expect from someone asking a question ("Make your question readable"), or posting an answer ("Break long lines sensibly so your answer is readable").

I don't really object to this as an additional format, though I doubt people would be using it much (the markdown formatting options are already numerous enough that most people don't know them all) and I don't personally see the need for it either (again I feel the onus is on the person posting to make their post readable)

| |
  • I see the need for the additional format mainly for log files. I think the format may be handy for code in some (rare) cases. – AnFi Feb 14 '14 at 16:35
  • 1
    @AndrzejA.Filip Sounds like you really want a "Log File" syntax highlighting type with trimmings then (IDK if syntax highlighting can do more than just highlight but that'd be a less painful implementation path if it can...) – voretaq7 Feb 14 '14 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .