diff options
| author | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-11 14:11:50 -0500 |
|---|---|---|
| committer | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-11 14:11:50 -0500 |
| commit | c3b21783adfb761f98f1201e484f083e0b936545 (patch) | |
| tree | 616ff0746fc94fc2d90641b6b6e15eaf87b9e017 | |
| parent | 62e1896caf091622cf6b56eb14ba5591155ac567 (diff) | |
Also clean apostrophes when adding new card
| -rw-r--r-- | add.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -45,6 +45,8 @@ type options struct { func addCard(c *http.Client, apiURL, deckName, modelName, front, back string) tea.Cmd { return func() tea.Msg { front = strings.TrimSpace(front) + // Replace apostrophes (possible if copy-pasting) with single quotes + front = strings.ReplaceAll(front, `’`, `'`) if back == "" { return errMsg(errors.New("definition is blank")) } |
