Xcode inserts unexpected apostrophes into Markdown and XML files

In Xcode, when you type a word like "don't", a second apostrophe is automatically inserted after the word and you have to manually delete it.

Repro steps:

  1. Create a new empty Markdown file or XML file.
  2. Open the file in Xcode.
  3. Type the word “don’t”.

Expected behavior: The word “don’t” appears.

Observed behavior: The word “don’t” appears, followed by an extra single quote.

I think this is one of those 'helpful' things because Xcode doesn't want you to miss out the trailing quote for a String, etc.

I can't find any option to turn it off in either Xcode's settings, or System Settings > Keyboard. And there's nothing in right-click substitutions (they all seem disabled).

I recommend you raise a suggestion in the normal way and ask that they include some way of not doing this in files with certain extensions.

If you look in Xcode's settings > General tab, this is the sort of thing I mean, and it would include: md, txt, xml...:

Your bug/suggestion won't really get progressed if it's only posted in these Developer Forums.

Raise it at https://feedbackassistant.apple.com/ You can then post the FB number here if you want.

Xcode inserts unexpected apostrophes into Markdown and XML files
 
 
Q