mirror of
https://github.com/facundoolano/jorge.git
synced 2024-11-16 07:47:40 +01:00
allow to escape smartify quote replacements
Some checks failed
Test project / build (push) Has been cancelled
Some checks failed
Test project / build (push) Has been cancelled
This commit is contained in:
parent
353eba4196
commit
81026648f7
1 changed files with 2 additions and 0 deletions
|
@ -55,6 +55,8 @@ var smartifyTransforms = []struct {
|
||||||
{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
|
||||||
}
|
}
|
||||||
|
|
||||||
var smartifyReplacer *strings.Replacer
|
var smartifyReplacer *strings.Replacer
|
||||||
|
|
Loading…
Reference in a new issue