Request: Replace various types of types of quotes

Here ya go:

#popclip
name: Curly Quotes Gone
icon: symbol:quote.opening
javascript: popclip.pasteText(popclip.input.text.replaceAll(/[“”]/g, '"'))

(The above block is an extension snippet - select it to install the extension with PopClip)

CleanShot 2022-04-06 at 08.38.56


Edit: Here’s how you would generalise it to add other types of quotes:

#popclip
name: Curly Quotes Gone 2
icon: symbol:quote.opening
javascript:
  let text = popclip.input.text;
  text = text.replaceAll(/[“”]/g, '"');
  text = text.replaceAll(/[‘’]/g, '\'');
  popclip.pasteText(text);

(note the single quote is escaped with backslash \')

2 Likes