]> git.sommitrealweird.co.uk Git - curses-crossword.git/blobdiff - curses_crossword.py
deal with multiple answer clues
[curses-crossword.git] / curses_crossword.py
index 123c3eefea861820687f6257062b9996bd9f6d0b..75643761cf91cbf06b7b58d538bf1510c2429b35 100755 (executable)
@@ -95,14 +95,14 @@ def parsecrossword(crossworddata):
             if inacross:
                 if line != "":
                     parts = line.split()
-                    question_number = int(parts[0])
+                    question_number = int(parts[0].split(",")[0])
                     clue = " ".join(parts[1:])
                     crossword["across"][int(question_number)] = \
                         clue.encode(code)
             if indown:
                 if line != "":
                     parts = line.split()
-                    question_number = int(parts[0])
+                    question_number = int(parts[0].split(",")[0])
                     clue = " ".join(parts[1:])
                     crossword["down"][int(question_number)] = clue.encode(code)
     num_cols = len(crossword["grid"][0])