In my answer to this question (Simpler input for the new unit support), I am trying to show that two different lines of code give the same result (490. m). I thus entered the following text:

enter image description here

However, I instead got this, in which my second entry of "490. m" is displayed as "491. m":

enter image description here

I tried deleting the second instance of "490. m" and reentering it, to no avail—the system still displays "491. m".

I get the same result when I add a right-arrow before the second "490. m", as follows:

enter image description here

However, when I instead write "490 m" (without the period), the anomalous behavior disappears. But then, to display the results on separate lines, I have to put an additional hard return between the two, and put a right arrow before each.

[N.B.: If you go to to my answer, you won't see the "491. m"; I deleted it to avoid the confusion it would cause.]

up vote 6 down vote accepted

I think this is not a bug, but running afoul with the Stack Exchange automatic list numbering behavior. For example below I type "1. item" three times on three separate lines, but presently get as displayed output "1. ... 2. ... 3. ...":

  1. item
  2. item
  3. item

The addition of Quote markdown does not change this:

  1. item
  2. item
  3. item

To get verbatim output you can also include Code markdown (or <pre> tags):

1. item
1. item
1. item

Addendum

You can create these formats by selecting your output as a whole, then clicking the appropriate buttons at the top of the editing box, or using the matching keyboard shortcuts. For example for the third format this would be buttons {} then ", or Ctrl+K, Ctrl+Q.

Since it was not possible for you to use the "edit" link to view the code of this answer here is the first answer section above, verbatim, itself in a <pre> block, with the exception of <pre> itself as I couldn't remember or figure out how to escape that.

I think this is not a bug, but running afoul with the Stack Exchange automatic list numbering behavior.  For example below I type "1. item" three times on three separate lines, but presently get as displayed output "1. ... 2. ... 3. ...":

1. item
1. item
1. item

The addition of Quote markdown does not change this:

> 1. item
> 1. item
> 1. item

To get verbatim output you can also include Code markdown (or PRE tags):

>     1. item
>     1. item
>     1. item
  • Wanted to look at your code using "edit", but I'm not allowed to. When I clicked on edit, I got this message: "Suggested edits are not allowed on non-tag-wiki posts on meta sites." Would like to know what your code for verbatim output is [don't know what "Code markdown" means.] – theorist Apr 30 at 5:53
  • @theorist Sorry, I did not anticipate that problem. I wonder of that is a fairly recent change to Stack Exchange. In any case I'll try to edit my answer to make the code more clear. – Mr.Wizard Apr 30 at 13:10
  • The only problem with the above approaches are that I'm trying to represent output, and they display the text on a gray background instead of a yellow one (I'm trying to follow the convention of gray for input, yellow for output). Doing what @m_goldberg suggested seems to come closest, since it makes it gray-within-yellow (on MSE-Meta it's pure gray, but on MSE it's gray-in-yellow). And that's good enough for me -- I don't need to make a project of getting pure yellow. And I'm still happy having accepted yours as the answer, since you provided the added detail explaining what was going on. – theorist May 1 at 2:08

An easy way to get the formatting you want is

490. m
490. m

which was entered as

>`490. m`  
>`490. m`

The 1st line has two black spaces after the closing `

  • Do you actually find this easy by comparison to Ctrl+K, Ctrl+Q? – Mr.Wizard Apr 30 at 13:20
  • @Mr.Wizard. Yeah. – m_goldberg Apr 30 at 13:32
  • +1 in that case, as I trust your experience :-) – Mr.Wizard Apr 30 at 13:34

You must log in to answer this question.

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