Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • 130
    This is a catastrophe waiting to happen even on non-code-centric sites. Copying something I wrote on the Mod Team feedback post: Arqade has a very dedicated community surrounding Minecraft, which has both single-line commands and JSON-like syntax for writing scripts or setting properties on objects. Most users writing Minecraft commands and scripts are not programmers, and lack the basic diagnostic awareness/skills to handle when the wrong quotes are used. This will likely cause ongoing strife/headaches for our site Commented Jan 26, 2021 at 22:44
  • 1
    Looks like this only happens with inline code, but not in code blocks (not to say that it's not a problem). Commented Jan 26, 2021 at 23:00
  • 3
    Heh, I noticed that yesterday when I was writing one of the other bug reports; when I finished it, I knew I noticed another bug but couldn't figure out what it was. Thanks for refreshing my memory! Commented Jan 27, 2021 at 7:07
  • 6
    @Makyen I hear your concerns and agree that this can indeed become a hairy problem. Code blocks and inline code should not trigger smart quotes at all, but at least on my machine inline code seems to trigger them. Are you on a Mac by any chance? I see a couple of options - we could disable smart quotes for specific sites or drop the feature altogether and let users who want them use their OS settings to type them. I'll check in with the team and see if there are good reasons for smart quotes to stick around. Stay tuned! Commented Jan 27, 2021 at 8:29
  • @HamVocke I've tested this on both a Windows 10 based PC and an Android device using both Google Chrome and Firefox. I didn't have to do anything other than just open the editor and start typing to have the quotes be changed to “smart quotes”. I don't recall ever having this issue in anything other than this editor. I don't see any way to not have it happen. Thus, I'm a bit surprised that Ben is having problems reproducing the issue. Commented Jan 27, 2021 at 9:26
  • 2
    @Makyen thanks, that helps! It's definitely Stacks-Editor handling the smart quotes. It's an optional ProseMirror feature that I hooked up to Stacks-Editor early on and never bothered to think too hard about. It's easy to disable but I want to check in with the Team first. Commented Jan 27, 2021 at 10:09
  • 83
    @HamVocke From my POV, it needs to be that smart quotes are never used, not just not in code format. We get a lot of code that is saved in a post revision as normal text (i.e. not in code format) and a lot more that is initially entered into the editor as basic text and only later placed in code format (sometimes several post revisions later). Once the editor changes the quotes, it's done and over; an additional problem has been introduced, which can have substantial negative repercussions for the post, and will commonly affect how it's received by others. Commented Jan 27, 2021 at 10:26
  • 118
    We just discussed this with the team. We're dropping the smart-quotes feature (and a few others that are in a similar vein). You can find the pull request here together with some additional explanation. Thanks for getting this onto our radar. This was really something I didn't put much thought into when I introduced it early on but I totally see how this was a bad idea. Commented Jan 27, 2021 at 15:19
  • 15
    I'm not even sure why "smart quotes" are a thing or what they are supposed to represent. Better to just not have them at all on the site. Commented Jan 28, 2021 at 22:52
  • 3
    @Braiam No, the code formatting which you tried to change is not emphasis. It's a demonstration of what happens when typing in code format. It's demonstrating the issue which is the entire point of this post. If the reason for that formatting was that I was just trying to emphasize it, then it would be in bold and italics. Commented Jan 29, 2021 at 18:45
  • 25
    @Braiam Because it is a short, concise demonstration of the issue that directly communicates (to everyone, except, apparently, you). Sure, I could make the whole thing longer by using an example of actual code, but I'd still have to explain that example with basically exactly the existing text. I would be doing that only in order to not have non-code in code format, when what I'm explicitly talking about there is text in code format. I agree one should not use code formatting for emphasis, and do edit posts to remove it. Again, if emphasis was the intent, it wouldn't be in code format. Commented Jan 29, 2021 at 21:46
  • The middle ground here would be to do what MS Word does: It auto-converts quotes to smart quotes; but you can hit Ctrl+Z after you type a (single or double) quote to convert it back to a normal quote. If need be, there could be a preference setting with a site-dependent default that enables that behaviour vs disabling smart quotes altogether. Commented Feb 5, 2021 at 23:20
  • I would personally argue, from a design perspective, smart quotes should always stay smart. In other words, if you copy and paste a smart quote, it should still grab the underlying straight quotes, and require any software that you paste it in to display them as smart quotes if they so wish.. Granted, I'm not sure HTML would make this easy (without some font shenanigans). But I've always opposed actually converting straight quotes to opening and closing quotes. Smart quotes are always just a cosmetic detail and contain no semantic difference. Commented Feb 9, 2021 at 3:34