From 4ef95bf9109961a517f4cf69129313ed2e64dfb6 Mon Sep 17 00:00:00 2001 From: facundo Date: Tue, 24 Sep 2024 11:30:52 -0300 Subject: [PATCH] fix smartify repalcement of quoted questions/exclamations --- markup/smartify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markup/smartify.go b/markup/smartify.go index 9e8c3dc..bd7fe1d 100644 --- a/markup/smartify.go +++ b/markup/smartify.go @@ -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