How about newlines within comments?
When posting a comment in stackoverflow how do I add newlines? I pasted some multi-line code example and stackoverflow stipped the newline characters and the code looks ugly!
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
From How do comments work?:
Comments are intentionally short, having maximum length of 600 characters, and allow only limited markup.
As such, they intentionally do not support newlines either.
You can use the
help link next to a comment box to see what is supported; from the comment formatting help:
Comments support only bold, italic, code and links; in addition, a few shorthand links are available.
Why do you want to put formatted code in a comment? Even with carriage returns I would find that ridiculously hard to read. Put it in the question or answer, then it has full formatting and it will most likely be syntax highlighted in the correct language, making it ever easier to read. Comments are for comments, not for code!