SO-Close-Vote-Reviewers / UserScripts

Various user scripts that add features to the review queue or to the chat room
Other
57 stars 40 forks source link

Magic™ Editor doesn't think e.g. requires a comma. #212

Open dbwiddis opened 2 years ago

dbwiddis commented 2 years ago

Grammar style guides for e.g. (exempli gratia) and i.e. (id est) generally state that a comma should be expected after them.

For example, Grammarly states:

E.g. and i.e. are both lowercase when they show up in the middle of a sentence (i.e., like this). Most American style guides recommend a period after both letters in both abbreviations.

In general, you add a comma after e.g. and between each subsequent example if there is more than one item in your list.

The AP style guide requires the commas:

AP Style has a specific way that it requires these two abbreviations to be written in writing. AP Style requires that a comma follow these abbreviations. Consider the following,

  • Wrong: The bulk (i.e. about 80 percent) of the work needs to be done in the next three days.
  • Correct: The bulk (i.e., about 80 percent) of the work needs to be done in the next three days.
  • Wrong: I have many hobbies (e.g. golf, sailing, writing).
  • Correct: I have many hobbies (e.g., golf, sailing, writing).

Presently, Magic™ Editor not only does not require the commas, it actively removes them. While I'm generally okay with not requiring they be added if they aren't already there, removing them is a bug.

Tyler-H commented 2 years ago

The reason it removes them is that you normally cannot 'legally' have a comma after a period in English (the general double punctuation rule); that i.e. and e.g. are succeeded by commas is a very specific exception. It's further complicated by American English vs British English differing here on the rules (Am English requires it for the most part, British English says don't use it).

Tyler-H commented 3 months ago

Adding bug tag because I do agree that, while it's OK to not require them, it shouldn't forcibly remove them, either.