diff options
| author | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-09 00:06:43 -0500 |
|---|---|---|
| committer | David Schlachter <t480-debian-git@schlachter.ca> | 2026-01-09 00:06:43 -0500 |
| commit | b390b93e1c86f90c9044323d6a4fa7f59bafc4f0 (patch) | |
| tree | e9a9036af4eead3872ac3dfc9d3d8457cdd291de /add.go | |
| parent | 1a3cba38218d5652be1d8c1d4b165bf980c97831 (diff) | |
Ignore whitespace in lookups and new cards
Diffstat (limited to 'add.go')
| -rw-r--r-- | add.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "strings" tea "github.com/charmbracelet/bubbletea" ) @@ -43,6 +44,7 @@ type options struct { func addCard(c *http.Client, apiURL, deckName, modelName, front, back string) tea.Cmd { return func() tea.Msg { + front = strings.TrimSpace(front) if back == "" { return errMsg(errors.New("definition is blank")) } |
