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

To make a line break, you have to end a sentence with two spaces.
To make a paragraph, you create a whole line between two blocks to text.

But when you create a line break, it doesn't end the formatting from the previous line like when you create a new paragraph.

Edit

Also, it seems that some examples of this bug (such as the first example which shows italics) only appear within the WMD preview and doesn't show up on the actual post itself.

Examples

Here's a method with an underscore: test_method
Here's another method with an underscore: foo_bar

[This only breaks in WMD preview]

Here's a method with an underscore: test_method

Here's another method with an underscore: foo_bar


Heres another example
Woah, I'm a new
line!

Heres another **example

Woah, I'm a new** line!


Here's some code
foo = bar

Here's some `code

foo = bar`


A method/function with underscores instead of spaces: i_am_a_test_method

[This only breaks in WMD preview]

share|improve this question

2 Answers 2

The real bug here – the inconsistency between the preview and the server-rendered version – was fixed a long time ago.

share|improve this answer

Pretty sure this is by design and part of the markdown spec.

You can try it at the babelmark markdown testbed if you like.

share|improve this answer
    
It seems the only Markdown implementations that catch this problem are BlueCloth and Maruku.. of course the Ruby implementations catch it =p /rubyfanboy –  c00lryguy Dec 16 '09 at 21:20
    
Also, that's pretty lame that markdown would do that by default. –  c00lryguy Dec 16 '09 at 21:21
1  
@Jeff Atwood - You are correct. Text formatting will end (reset) with the start of a new paragraph. But a line break does not start a new paragraph so the formatting continues. This is consistent with any editor I can recall. –  Robert Cartaino Dec 16 '09 at 21:23
    
Yes, but on stack overflow people often type in code and it is pretty standard to use underscores in place of spaces in method/function names. So it could easily confuse a method/function name with markdown formatting. –  c00lryguy Dec 16 '09 at 21:26
    
There, I edited it. See the last example, i_am_a_test_method. That only gets formatted within the WMD preview pane but displays correctly in the actual post. That's definitely a bug. –  c00lryguy Dec 16 '09 at 21:29
    
I thought the problem was "...But when you create a line break, it doesn't end the formatting." Now I'm not sure which "bug" you are reporting. Maybe I misread it. –  Robert Cartaino Dec 16 '09 at 21:36
    
It started as that as the bug, but then I found out that the way WMD's preview renders it and the way the server renders it are different. =p –  c00lryguy Dec 16 '09 at 21:42

You must log in to answer this question.