Linked Questions

168 votes
9 answers
10k views

Code block is not properly formatted when placed immediately after a list item [duplicate]

Consider the following piece of Markdown code: This is some regular text. >>> def factorial(n): ... return 1 if n < 2 else n * factorial(n - 1) ... * This is a list ...
Stephan202's user avatar
  • 5,479
395 votes
1 answer
274k views

How do I format my code blocks?

How do I post text so that it is formatted as code? What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax ...
3 votes
1 answer
3k views

How can I write nested code on a nested list with markdown? [duplicate]

I need to write a nested code block on a sub element of a list. My list look like 1. element 1 1. element 2 1. element 3, this has subelements 1. sub element 1 1. sub element 2 this one ...
otmezger's user avatar
  • 141
4 votes
2 answers
1k views

Code block display within an ordered list? [duplicate]

I was attempting to edit a post earlier, but couldn't get a code block to display within an ordered list. I've not found any reference to this directly and despite indenting and trying a few ...
nickhar's user avatar
  • 2,395
1 vote
3 answers
207 views

Bug in Stack Overflow Markdown rendering when code follows a list [duplicate]

Code following a list, though not to be included in the list itself, is not correctly rendered, as shown below. I have tried inserting linebreaks, to no avail. Inserting "dummy" text will ...
Richard Michael's user avatar
4 votes
1 answer
269 views

Code after bullet list isn't rendered correctly [duplicate]

Possible Duplicate: How to nest code within a list using markdown If there is a list immediately followed by a code block the code block is not recognized as code (Even though there is a newline ...
Motti's user avatar
  • 2,444
1 vote
1 answer
142 views

Can't show xml code? [duplicate]

Possible Duplicate: How to nest code within a list using markdown I'm trying to put XML code in this answer, but it's not displaying at all. I tried using the code formatter and then ctrl + k (...
James Drinkard's user avatar
-7 votes
1 answer
187 views

Markdown: Code directly after a list (and not as part of that list) [duplicate]

Sometimes, when I answer a question, I use a list to explain things and add some code after that, for example: argument 1 is hoppa argument 2 is klap argument 3 is klap command hoppa klap klap The ...
Ljm Dullaart's user avatar
4 votes
1 answer
137 views

Code immediately following a list does not format properly [duplicate]

Formatting breaks if code follows a list: List item List item This is in a code block This does not work as expected However, it works if between the list and the code List item List item There ...
Hauke Laging's user avatar
2 votes
2 answers
81 views

Code Block not showing up within a list [duplicate]

Possible Duplicates: How do I include a code block right after a list without it turning into a blockquote? How to nest code within a list using markdown I edited this question, but even after ...
George Stocker's user avatar
-5 votes
1 answer
123 views

Single line code formatting after list not working [duplicate]

Possible Duplicate: How to nest code within a list using Markdown Markdown formatting bug with code blocks in lists In this answer the first line of code in the question is being displayed ...
asheeshr's user avatar
  • 14.1k
0 votes
1 answer
75 views

Why can't I format my code in this answer? [duplicate]

Possible Duplicate: How to nest code within a list using markdown https://stackoverflow.com/a/13169659/57135 I know how to format code, but can't get it to work in this answer. Not sure why?
Joe's user avatar
  • 1,132
1 vote
0 answers
60 views

Numbered list item 2 appears as 1 in my answer... what is causing it? [duplicate]

I have an answer on SO like this 1. step Some text 2. step Problem it looks like this step Some text step Why is it making 2 appear as 1? Link CSS two level menu - ...
user1721135's user avatar
1 vote
1 answer
42 views

How to add "Code sample" under "Numbered list"? [duplicate]

I want to add Code sample under Numbered List but unfortunately I am not able to do so. Here is an example of what I want to achieve: Using Numbered List - This is my first point I want to add my ...
Rahul Mane's user avatar
0 votes
0 answers
51 views

There may be a little bug on Stack Overflow Markdown [duplicate]

When I'm editing a question on Stack Overflow, the list followed by code is not supported by Stack Overflow. I clicked code Multiple times, but it didn't work. The same is Meta. While the ...
dengApro's user avatar
  • 133

15 30 50 per page