23

When reviewing suggested edits, the markdown version and rendered version can show different changes, particularly block-indenting of code. More specifically, it's possible for the markdown version to omit certain changes. For example, in this edit review, the markdown looks like this:

enter image description here

but the rendered version looks like this:

enter image description here

These are very different. I was double-checking some recent reviews and thought that the markdown correctly reflected all that had changed, that is, some trivial (and mostly incorrect) use of inline-code formatting. I therefore thought certain users had performed bad reviews, when in fact they had not.

This is a bug. Some changes will inevitably be invisible in the rendered output, but the markdown should always show all changes, especially significant formatting improvements.

Note: I don't think this is a duplicate. Similar questions have been asked before (for example: this, this, and this), but they aren't the same. Most of the time, people are pointing out that the rendered view doesn't display all changes. I haven't found anywhere that someone has pointed out that the markdown is omitting changes (and gotten an answer).

Can we fix this?

4
  • Do you suppose this issue is restricted to SO? Else it would make sense to post the question to meta SE, wouldn't it?
    – guntbert
    Commented Aug 3, 2016 at 20:22
  • Related question I just asked about Docs.
    – Laurel
    Commented Aug 3, 2016 at 21:11
  • 5
    @guntbert Users Can Report Bugs On Whatever Child Meta Site Suits Them. If you want the Meta EXP, report on mSE; if not, here works. ;)
    – hichris123
    Commented Aug 3, 2016 at 21:15
  • 1
    @guntbert It's almost certainly a network-wide issue, though it's only likely to come up on certain sites. Some SE sites don't really make much use of code formatting, so bugs there wouldn't necessarily matter.
    – elixenide Mod
    Commented Aug 3, 2016 at 21:30

1 Answer 1

8

Technically there's no bug in the markdown diff view. It is accurately showing that a blank line was added between the non-indented lines and the indented lines, and that's what caused the rendering change (indented lines after non-indented lines don't get rendered as code unless there's at least one blank line in between).

Perhaps the SO markdown parser should be changed to handle this differently, but that's another request.

3
  • I see what you're saying. I was thinking it was the indenting that changed, but you're right that it's only a line addition. (It has been a long day.) I do think that needs to be made much more clear, but I have to agree it's not technically a bug. I'm accepting this answer and will try to rewrite this into a feature request (as a new question, of course).
    – elixenide Mod
    Commented Aug 3, 2016 at 22:37
  • 1
    @EdCottrell it may be a change bought about by the commonmark implementation, as before that it was ambiguous if the new line before a code block was necessary.
    – Braiam
    Commented Aug 4, 2016 at 2:58
  • It could be nice to display a grey "carriage return" symbol like U+23CE (⏎) or U+21B5 (↵) to make the new line more visible.
    – Didier L
    Commented Aug 4, 2016 at 8:17

You must log in to answer this question.

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