Remove smart quotes, ellipsis, emdash input rules #10
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Feedback on meta shows that automatically converting quotes to smart quotes in rich-text mode doesn't spark joy.
The reasoning is sound. On a programming website quotes often occur in code samples. Converting them to smart quotes will break code samples and we all know how much people love copy/pasting code samples.
This PR removes the usage of a bunch of Prosemirror's input rules that could make developers' lives harder:
...to …--to —All of the above are used in code in some form:
--is a decrement operator,...is used as the spread operator in JS and quotes are... quotes.We should not try to be smart about these things. If people are adamant using smart quotes or typographically correct characters, they'll most likely know how to enter them (e.g. by using their operating system's settings or using Alt codes).
These input rules haven't been a deliberately requested feature anyways. I remember adding them as we were still in the prototyping phase and I didn't think much about it. Seems like the made it all the way to production because that's what good prototypes do.
If we find out that people want to keep these as an opt-in option, we can still bring them back as a setting for the editor or special sites on the network. For now: Let's get rid of them.