diff options
Diffstat (limited to 'flashcards')
-rwxr-xr-x | flashcards | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -38,11 +38,13 @@ def extractCards(f): match = re.match(cardRegex, l) if match: if front != "": - cards.append([front, back]) + cards.append([front.strip(), back.strip()]) back = "" front = match.string[prefixLength:] else: back += l + # do the last front-back pair before returning + cards.append([front.strip(), back.strip()]) return cards # Loops serving cards to the user until the program is exited |