summaryrefslogtreecommitdiff
path: root/setup.go
diff options
context:
space:
mode:
authorDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-11 13:35:30 -0500
committerDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-11 13:35:30 -0500
commit32acf8c4940b5e7088b0651d5e7ea480afee9e7b (patch)
tree17089d438ecad90a181c6d46c11359254b139032 /setup.go
parent6f5a49c07b20c77907a8d0578dedf1197979a16b (diff)
Clean up apostrophes
Diffstat (limited to 'setup.go')
-rw-r--r--setup.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.go b/setup.go
index d88db48..dbd9955 100644
--- a/setup.go
+++ b/setup.go
@@ -125,6 +125,10 @@ func populateDictionary(rawDictionary string, db *sql.DB) error {
continue
}
+ // Clean up the word. Replace apostrophes (common in phrases) with
+ // single quotes (more likely to be typed by a user).
+ result.Word = strings.ReplaceAll(result.Word, `’`, `'`)
+
// Create the definition text.
entry := templateReadyDictionaryEntry{
Word: result.Word,