What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

I've just edited http://serverfault.com/questions/95353/backup-solutions-for-rackspace-cloud-sites/95368#95368 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

3 Answers 3

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 .