8
\$\begingroup\$

The new feature from Implement ```-style (fenced) Markdown code blocks is a great addition, but there is a small bug which bizarrely only appears on Code Review & Code Review Meta. If a code block contains a blank line anywhere, and the closing ``` isn't followed by a newline, it will be taken as code rather than a closing fence.

The bug applies to both the previews the posted content. It can be worked around easily enough by finishing the post with a newline, but is unexpected.

This can result in accidental noise in any code block at the end of a post:

some code

more code but there was a blank line above
```
\$\endgroup\$
  • \$\begingroup\$ I think I'd consider that status-by-design pending "Word of God" from the implementing dev. \$\endgroup\$ – Vogel612 Apr 14 at 10:10
  • 7
    \$\begingroup\$ @Vogel612 the thing is that the same bug does not appear on the main meta site, nor on StackOverflow. So I'm thinking it's some interaction with bespoke CodeReview formatting. Also it only manifests if there's a blank line somewhere in the posted code. It's just too weirdly specific to be intentional. \$\endgroup\$ – Dave Apr 14 at 10:55
  • 3
    \$\begingroup\$ I agree, this does seem like a bug. \$\endgroup\$ – Simon Forsberg Apr 14 at 14:33
  • 2
    \$\begingroup\$ Appears to be some weird interaction with MathJax. Wild... \$\endgroup\$ – Shog9 Apr 16 at 17:42

You must log in to answer this question.

Browse other questions tagged .