User:Ingram/chick.js

function curlyQuotes(inp) { return inp.replace(/(\b)'/, "$1’") .replace(/'(\b)/, "‘$1") .replace(/(\b)"/, "$1”")             .replace(/"(\b)/, "“$1") }