summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,