Skip to content

Commit

Permalink
fix smartify repalcement of quoted periods
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Sep 26, 2024
1 parent 4ef95bf commit 18fc0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markup/smartify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18fc0ac

Please sign in to comment.