Convert smart/curly quotes to straight

I often paste article-sized text into Obsidian for editing, before moving it on to WordPress. It often originates in Microsoft Word or similar, which commit the crime of Smart Quotes. It’s best for me to use straight, normal quotes in WordPress, which can render them with curly flourish on the frontend all by itself.

So, I would like a way to convert smart/curly quotes (single and double, open and close) to straight quotes.

I note:

I’m not about to resort to regex or Templater as this seems like complexity.

Other options involve using something outside of Obsidian…

eg. I recently installed a Mac helper app called Get Plain Text, which actually supports more than just removing formatting; it also allows for conversion of many character types, including smart quotes to straight.

You can set them up to your preference via the Services menu of macOS. That menu is typically available in two places: right-click contextual menu over doc text, and universally in the top menu bar.

Obsidian doesn’t seem to support the native Mac right-click contextual menu, so/but I can invoke this thing from the main system menu bar Services option, which is a bit slower and a context shift, but there we are. Oh, only problem is, it also messes up some of my Markdown formatting.

For all these reasons, it seems natural that a plugin or feature would exist inside Obsidian that could handle this.

You should be able to turn off Smart Quotes in Microsoft Word or other word processors. Might also want to go into the mac System Preferences:Keyboard and be sure “use smart quotes and dashes” is not checked.

I am not the originator of the material with smart quotes.

While you’re waiting for Obsidian to add the feature, you might try using VS Code, which has a plugin that does exactly what you want. (You can also use the Obsidian Open With plugin, which lets you open notes with other apps including VS Code directly from the File Explorer.)

I’m the opposite—I strongly prefer typographic quotation marks to straight ones in prose—and one of the reasons I don’t like using VS Code as a markdown editor is because it only has a plugin that does what you want, and none that does what I want. :wink:

Thanks. Yeah, I’m finding VS Code covers several things Obsidian can’t, eg. Copying an article from preview as richly-formatted. Just right for pasting into WordPress. Obsidian, however, seemed to copy it as Markdown.

Post script…
I used this VS Code extension - Replace curly quotes - Visual Studio Marketplace

1 Like