diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2019-06-21 13:16:47 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2019-06-21 13:16:47 -0400 |
| commit | 84121b3bb4820945eeec3ad6084f24c37b015683 (patch) | |
| tree | d4aa970ce388eae8e1a41c4d94decedbc4f6f9f3 /utils.go | |
| parent | 58011496071a49e8f5f916a0416c36806ee94614 (diff) | |
| download | bibtex-master.tar.gz | |
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -158,6 +158,8 @@ func squeezeSpaces(s string) string { return buf.String() } +var replacer = strings.NewReplacer("---", "—", "--", "–", "~", "\u00A0", "``", "“", "''", "”", "'", "’", "\"", "”") + func UnTex(s string) string { r := newReader(s) var buf bytes.Buffer @@ -183,8 +185,6 @@ func UnTex(s string) string { } s = string(norm.NFC.Bytes(buf.Bytes())) s = squeezeSpaces(s) - replacer := strings.NewReplacer("---", "—", "--", "–", "~", "\u00A0", - "``", "“", "''", "”", "'", "’", "\"", "”") return replacer.Replace(s) } |
