8

The review for this suggested edit has broken rendered output on the left:

The code in the original post appears as empty code blocks.

But the answer looks good outside of review:

The code is visible as inline code sections, not blocks, and properly indented in the ordered list.

5
  • I'm able to verify on Chrome for Android and Firefox for Windows 10, looks like a good bug.
    – Davy M
    Commented Mar 28, 2019 at 22:10
  • And I tested it on Ubuntu16.04 with Opera and Firefox.
    – sanyassh
    Commented Mar 28, 2019 at 22:12
  • I think you mean "broken rendering"; the view you are showing is not the markdown view. But it's not broken; the original use GitHub flavor code demarcation, with the code immediately following the tickmarks, causing an empty code block to appear. Commented Mar 28, 2019 at 22:31
  • @HereticMonkey yes, you are right, edited question accordingly.
    – sanyassh
    Commented Mar 28, 2019 at 22:34
  • <gulp>triple backticks Commented Mar 30, 2019 at 8:45

1 Answer 1

7

This is by design and an artifact of a transition we went through to add support for ``` blocks.

Earlier this year we added support for these blocks, making

1. ```javascript
2. var x = 1;
3. ```

render as

var x = 1;

Unfortunately, we already supported ``` for inline code. I'm guessing it was so you could do backticks ` in code but it also supported line breaks while producing inline code.

So originally, that post had backticks with line breaks that functioned as inline code, but upon edit and re-rendering, those became code blocks and markdown treated the first line as a type hint erasing their content.

But what's happening in the preview?

The preview is using our new markdown renderer to show both the before and after HTML, so the HTML is rendering poorly because it was written for a different renderer. We just don't have things set up to continue rendering old revisions with the old renderer and new revisions with the new renderer and are accepting that as a cost of the transition. This issue only comes up at most once per post and there is supposed to be tooling in place to aid editors crossing that bridge.

1
  • Something is really "off" here. Look at this question for example: stackoverflow.com/questions/56432801/multi-threading-issue ... the OP is using 3 backticks all over his questions. I am wondering: is that because he really typed them, or is some of the markup buttons inserting those?!
    – GhostCat
    Commented Jun 3, 2019 at 18:46

You must log in to answer this question.

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