Correct the syntax that's used for smart single and double quotes

Fixes gh-1753