Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I've just edited to add <pre> tags around the shell script, and whilst the live preview showed the correct layout, when I save the edit I got a horrendous wrapped, non-<pre> version. Looking at the HTML source, there's no <pre> tag (or equivalent) in there at all. Markdown fail?

share|improve this question
up vote 2 down vote accepted

Just indent by 4 spaces. Or use the toolbar button that does it for you.

The only reason to use <pre> is if you have some reason to avoid the automatic syntax highlighting.

And note that if you do use <pre> you must escape < and > to &lt; and &gt; within the pre block. That was your specific problem, but the easiest answer is .. indent 4 spaces.

share|improve this answer
What if you wanted to put links inside your fixed-width space-and-newline-preserving block? – SamB Feb 6 '12 at 22:49

I just viewed source and saw the pre tag, both start and close. Perhaps Markdown got confused because you have what looks (to it) like Markdown inside the pre?

Try indent by 4 spaces perhaps?

share|improve this answer

The post is truncated. Add whitespace (space/new line) at the end of the post (behind the <pre>). That could help.

share|improve this answer

You must log in to answer this question.

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