9 ms·
Reddit also messes with numbers followed by periods at the start of lines. It doesn't convert them to roman numerals, but it does infer from their presence that
by tzs 7y ago
Reddit also messes with numbers followed by periods at the start of lines. It doesn't convert them to roman numerals, but it does infer from their presence that you are trying to make a numbered list, and it apparently also assumes that you have no idea how to count, so it renumbers the list for you.
This regularly screws up posts in /r/chess. Someone might post something like this:
1.e4 e5 2.f4 exf4 3.Nf3 g5 4.Bc4 g4
5.O-O gxf3 6.Bxf7+ Kxf7 7.Qxf3 Bc5+
8.Kh1 d6 9.c3 Nc6 10.d4 Nxd4 11.cxd4 Bxd4
12.Bxf4 Nf6 13.Bg5 Rg8 14.Qh5+ Rg6
and Reddit changes it to this:
1.e4 e5 2.f4 exf4 3.Nf3 g5 4.Bc4 g4
2.O-O gxf3 6.Bxf7+ Kxf7 7.Qxf3 Bc5+
3.Kh1 d6 9.c3 Nc6 10.d4 Nxd4 11.cxd4 Bxd4
4.Bxf4 Nf6 13.Bg5 Rg8 14.Qh5+ Rg6
- brson 7y agoReddit also uses commonmark, plus some GitHub flavored markdown extensions, via the comrak library, plus some custom extensions. So Reddit markdown should mostly look like GitHub.
- sorenjan 7y agoReddit seems to use two different Markdown engines. I use old.reddit.com, and I've noticed that some users that use new Reddit post code in ``` blocks. That doesn't work on old Reddit where you need to put four spaces in front of every line for it to render as code, so it just looks messy. I'm guessing their WYSIWYG editor uses the ``` version.
- deleted 7y ago[deleted]
- crtasm 7y agoI only use old reddit and can post/view ```code blocks``` without issue.
- sorenjan 7y agoI went looking for some examples and found these two. The first [0] is someone that tried to post a ``` block, but it's not rendering properly on old Reddit. It does render ok as a code block on new Reddit in a private window. The second [1] is somebody that posted a ``` block but also indented all lines with four spaces. That renders as a code block with ``` lines before and after it on old Reddit, and as extra indented code on new Reddit. If you use RES you can look at the raw Markdown code for each comment using the source link. Maybe you´re thinking of inline code which use a single ` before and after the code content? Screenshots: https://imgur.com/a/TKSKoEB https://imgur.com/a/TKSKoEB [0] https://www.reddit.com/r/cpp/comments/e16s1m/what_is_wrong_with_stdregex/f8reo8f/ https://www.reddit.com/r/cpp/comments/e16s1m/what_is_wrong_w... [1] https://www.reddit.com/r/cpp/comments/e0fdp3/simple_timer_for_scheduling_tasks/f8dzizz/ https://www.reddit.com/r/cpp/comments/e0fdp3/simple_timer_fo...
- crtasm 7y agoYou're correct, I was thinking of `inline code`. The old Reddit formatting wiki page doesn't mention ``` now I look, there's a note on new Reddit about sticking to spaces for compatability: https://www.reddit.com/wiki/markdown https://www.reddit.com/wiki/markdown Would be nice if they fixed it indeed.
- Deimorz 7y agoThat's how Markdown is supposed to treat numbered lists. This section describes it in John Gruber's original description of Markdown syntax: https://daringfireball.net/projects/markdown/syntax#list https://daringfireball.net/projects/markdown/syntax#list > It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. It does cause a lot of surprising errors though, especially when the person isn't actually trying to write a list. For example, a case that comes up often is that someone will ask a question like, "when did this happen?" and someone will reply something like, "1986. It was a rough year." But due to markdown interpreting that as a list, it will get rendered as "1. It was a rough year." Causes a lot of fun and confusion around ages too when it looks like someone's saying their child/significant other/etc. is one year old when they really typed a completely different age.
- PhasmaFelis 7y ago> That's how Markdown is supposed to treat numbered lists. Huh. Is there a some reason why that's not obviously, bafflingly obtuse? (Kind of like how Markdown and HN won't allow you to single-space text except in a code block)
- jrowley 7y agoIt’s a really convenient property if you’re maintaining long lists since you can easily re-order items in a list without having to re-number each item.
- saalweachter 7y agoYeah, it's great for wikis. Less so for forums.
- gibspaulding 7y agoIt seems like for those situations it would be much nicer to just have something like \item in LaTeX. It's still readable in plaintext, but wouldn't break things.
- 7y ago
- tomrod 7y agoYou can escape with \5.
- ssivark 7y agoThe whole value proposition of markdown was supposed to be that a writer/reader need not create a detailed mental model to mentally parse the text. All of these are examples show why markdown (parsing/specification) is "broken" for use cases outside the straight and narrow. No big deal for now... Platforms which don't want to punish their users will accrete special cases and escape characters -- till some time in the future where the language will start feeling heavy with un-intuitive behavior. And so the cycle goes. :smh:
- baroffoos 7y agoThe point of the numbering changes is if you want to insert a new item half way through the list you don't have to change every single line. Unfortunately it probably confuses people more often than it helps them.
- sammorrowdrums 7y agoI'd also add that while I agree with the confusion expressed, using code snippets to escape from markdown parsing is important when sharing stuff that literally contains markdown. Of course that depends somewhat on the provider and what custom flavour of MD they use, which is often contraversial. Like #463 GitHub auto linking, which I usually like, but occasionally been caught by it.
- c3534l 7y agoI've come to the conclusion that the worst thing about how developers design their products is the existence of "features" that override the user without the user ever telling it to. It assumes you wanted to do something other than was was inputted without getting further input from the user indicating they wanted to carry out that action. Pretty much every massive technology fuck-up in my life has been the result of the computer doing something other than what I told it to do and me not realizing or not being able to fix it after it did so. Things like "open restored document" helpfully deleting the older, unrestored document for me, attaching signatures to emails when I didn't configure a signature, etc. I want to start a movement that forces us to ask every new feature "did the user tell the computer to do X and if so, where is it indicated that X will happen?" There are a million examples when you look out for it and they're all infuriating.
- 3JPLW 7y agoI mean, they wouldn't have really wanted it to be formatted like a list, even if the numbering was correct.
- deleted 7y ago[deleted]
- bartl 7y agoFormat it as code (indent with at least 4 spaces). Problem solved.
- _0ffh 7y agoThat's some insidious auto-incorrecting there! I actually hate all auto-"correction" features with a passion. After every Office update at work I have to go into the Outlook settings and manually disable all of that crap, but that still beats the hell out of having to live with it.
- Nexxxeh 7y agoHave you asked your admin if it's possible to keep your Office settings through updates? I'm assuming you have, but you'd (possibly) be amazed at the stuff people don't mention to their IT guy... Literally one client just "lived with" one of their screens being yellow. Never thought to mention it.
- pbhjpbhj 7y agoThere's often a send that "this is what my employer have me to work with, I'm getting on with it". Perhaps there needs to be some effort to poll for issues rather than rely on interrupts.
- _0ffh 7y agoOh, if I even had an assigned administrator! Fifteen years ago, there was indeed an "in situ" administrator for the department. Five years ago, I could at least still find a couple of that ever farther removed breed of man in a room of the same building. Nowadays all we have is two alternative methods to have a "ticket" created, namely telephone and email. The main job of the first line of "support", located in a low-wage country, is to have every ticket you create closed as quickly as humanly possible. If your request is not on the (short) list of standardised tasks (like package assignment) it will usually get closed as "not an issue, won't fix". You then have to re-open and escalate, to get to someone who is capable of more than just following a few simple instructions from a process guideline. Even then, anything that is out of the norm will usually end in someone saying "this kind of request has not been anticipated" or "I'm probably not allowed to do that". Frankly, most of the time I don't even try anymore. Welcome to 1/2M employees company bureaucratic nightmare.
- CarlRJ 7y agoThe "solution" is to make it "not a list" by escaping every first "." in your first example with a backslash. Yeah, this one _is_ annoying. I'm not one to post chess games, but I've run into this one a bunch in other situations. The _only_ case where this particular behavior is helpful is where one starts _every_ entry in a numbered list with (the same literal) "1. ", and lets Markdown sort it out - and that can be handy, because you can rearrange the list items and they still number properly, but in every other case it fails - it's a feature that produces more astonishment than happiness.