smartquotes.js icon indicating copy to clipboard operation
smartquotes.js copied to clipboard

Quotations containing non-word characters end up backwards at the start

Open mastermaq opened this issue 3 years ago • 1 comments

Currently, a quotation such as:

"(They) are our trusted and respected neighbours, business partners, and friends," read a press release.

Gets converted into:

”(They) are our trusted and respected neighbours, business partners, and friends,” read a press release.

Note the backwards character at the start.

The issue is on Line 5 of replacements.js. Changing the regex to something like (\W|^)"(\w|\(|') would account for a parenthesis or single quote at the start of a quotation, which is not uncommon. Do you see any other problems with a change like this?

mastermaq avatar Jun 02 '21 17:06 mastermaq

I just want to second this issue and add that it is fairly common to have the first character in a quote be [. This is because brackets are used to indicate that the quote, including the capitalization of the first letter, has been changed. Consequently, "This is a quote" might be excerpted to "[A] quote." or used in a sentence like: I have already mentioned that "[t]his is a quote."). Indicating changes in this manner is required by MLA style (MLA Handbook 8th, 75) and Bluebook style (Rule 5.2(a)) and is permitted in Chicago Style (CMS 2003, 447).

bbernicker avatar Oct 06 '22 18:10 bbernicker