Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 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 wasn't following Meta Stack Overflow too closely so maybe something was changed that I'm not aware of. But each time I paste a snippet from a Python console I'm getting wrong formatting. What I'm doing wrong? It seems that '>>>' is confusing for Stack Overflow. I've tried to escape it with backslashes, and it was working fine in preview but doesn't work after the question is rendered.

I was able to observe that problem on: recent Chrome (Windows, Mac), Safari 4 (Mac).

Here is my recent answer I wasn't able to make right.

Funny, I think the snippets are rendered just fine on Meta Stack Overflow. Here is one:

>>> def throw(): raise Exception() 
... 
>>> a=1
>>> a=throw()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in throw
Exception
>>> a
1
share|improve this question
    
Does this happen in stable/released/supported browsers? The team doesn't even look at bugs that only happen in beta/dev browsers. – Pops Nov 23 '10 at 19:53
    
@Popular it doesn't work on safari 4, mac os x. – Piotr Czapla Nov 23 '10 at 19:58
    
@Popular Good point. I've forgot to mention that :) – Piotr Czapla Nov 23 '10 at 19:58
up vote 6 down vote accepted

That is a subtle case where the code-block was considered part of the bullet-list, so needed double indenting - otherwise it assumed the > was the markdown for a quoted section. I just added a new line between the "Check this out:" to break out of the bullet-list.

So with markdown:

- bullet 1
- bullet 2

    this looks like a code block, but isn't; it is just more text in bullet 2

- bullet 3
- bullet 4

        this *is* a code block in the bulletted list (in bullet 4)

finish bullet 4

this text is no longer part of the bullet-list

    and hence this is a code-block

and to prove it:

  • bullet 1
  • bullet 2

    this looks like a code block, but isn't; it is just more text in bullet 2

  • bullet 3

  • bullet 4

    this *is* a code block in the bulletted list (in bullet 4)
    

    finish bullet 4

this text is no longer part of the bullet-list

and hence this is a code-block
share|improve this answer
    
or you can add <-- separator --> if you need to disambiguate at the bottom of a list – Jeff Atwood Nov 24 '10 at 1:12

You must log in to answer this question.

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