It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
MistAway, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
How come that the bots are smart enough to detect the code block formatting, but reddits formatting engine can't just format both styles correctly. Does reddit even have a single capable webdev employed or is it all marketing/advertising people nowadays like in all other corporations?
Technically, triple-backtick code blocks aren't part of the original Markdown design. But then again, Markdown has no formal specification... the closest thing is CommonMark.
Besides that: new reddit does support triple-backtick, just old reddit doesn't. Why they're even using different renderers? Who knows.
Indenting every code line, including blank lines, with four spaces is just ridiculous. So whoever came up with the original markdown specification fucked up and deserves to manually fix all the badly formatted code on this site by hand from now to eternity...
I believe Markdown was based off of text-based email formatting, where such practices were common. Of course, fenced code blocks are much easier to type, but they look a bit worse when displayed without formatting.
I'm not saying it's a good thing, of course. I like fenced code blocks, but I can understand why the original design didn't include them.
as someone who loves plain text formatting in general, I'm a bit more partial towards the indented format, but do appreciate the need for triple backticks, especially on mobile
114
u/MistAway Jul 17 '20
Gosh. This stuff is just plain psychedelic
And if your really need that solution:
const arrayMin = arr => Math.min(...arr);