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

This commit is contained in:
facundo 2024-09-26 12:48:27 -03:00
parent 4ef95bf910
commit 18fc0aca2f

View file

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