not-lain commited on
Commit
6163418
1 Parent(s): c2115a0
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -132,7 +132,7 @@ def handle_json_output(json_list : list) :
132
  element["termType"] = "basic"
133
  cloze_matches = re.findall(r'_{2,}', front)
134
  # match only the first one, if there is multiple don't do anything
135
- if cloze_matches != [] & len(cloze_matches != 2):
136
  # It's a cloze type card
137
  element["termType"] = "cloze"
138
  # inject the back in a span format into the front
 
132
  element["termType"] = "basic"
133
  cloze_matches = re.findall(r'_{2,}', front)
134
  # match only the first one, if there is multiple don't do anything
135
+ if (cloze_matches != []) & (len(cloze_matches)<= 2):
136
  # It's a cloze type card
137
  element["termType"] = "cloze"
138
  # inject the back in a span format into the front