fix smartify repalcement of quoted questions/exclamations
Some checks failed
Test project / build (push) Has been cancelled

This commit is contained in:
facundo 2024-09-24 11:30:52 -03:00
parent e1d0a38483
commit 4ef95bf910

View file

@ -53,7 +53,7 @@ var smartifyTransforms = []struct {
{regexp.MustCompile("(^|[^[:alnum:]])``(.+?)''"), "$1“$2”"},
{regexp.MustCompile(`(^|[^[:alnum:]])'`), "$1"},
{regexp.MustCompile(`'`), ""},
{regexp.MustCompile(`(^|[^[:alnum:]])"`), "$1“"},
{regexp.MustCompile(`(^|[^[:alnum:]?!])"`), "$1“"},
{regexp.MustCompile(`"($|[^[:alnum:]])`), "”$1"},
{regexp.MustCompile(`\\[]`), "'"}, // undo backslashed replacements
{regexp.MustCompile(`\\[“”]`), `"`}, // undo backslashed replacements