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

When I write a question sometimes I would like to distinguish the error messages from code and also from my description of the problem.

Is there a way for text to appear in a box like code but to not be syntax highlighted?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

This already exists.

You need to prepend error text with >.

just like this

This is documented in the edit help under Simple blockquotes.

Another option is to wrap the whole error in <pre></pre>.

Just 
Like
This
share|improve this answer
    
Indeed, this is actually used to Quote stuff (shortcut for <blockquote> tag wrapping (example)) - as you quote error messages, it fits well. :) –  Shadow Wizard Jan 11 '12 at 11:17
    
but you have to put > per line. this isn't much of a problem though as error messages are usually one line. –  user152642 Jan 11 '12 at 11:24
    
@user152642 - If the lines follow one another, just doing this with the first would be enough (though you will lose formatting). Answer updated with another option. –  Oded Jan 11 '12 at 11:25
    
This breaks as soon as the error message contains things that look like html tags/..., for example template arguments in C++. –  sth Jan 11 '12 at 13:54
    
@sth - True. For those instances, use the normal ` for escaping. –  Oded Jan 11 '12 at 13:55

You can use a code block and disable the syntax highlighting with a syntax highlighting hint.

<!-- language: lang-none -->

    error message indented four spaces
    ...

Unlike <pre>, this allows characters like <, > and & to be used without escaping.

share|improve this answer

You must log in to answer this question.

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