John Smith commited on 2022-109 22:37:13
Showing 2 changed files, with 4 additions and 3 deletions.
| ... | ... |
@@ -175,8 +175,8 @@ elseif action == "r" then |
| 175 | 175 |
if deck then |
| 176 | 176 |
-- collect list of index-pairs for prompts to be reviewed this session |
| 177 | 177 |
local ctrt = review.list(deck, function(pr) |
| 178 |
- -- exclude prompts that use images or Unicode |
|
| 179 |
- return (not pr.text:find("IMG%[")) and (not pr.text:find("[\u{81}-\u{FFFFF}]"))
|
|
| 178 |
+ -- exclude prompts that use images |
|
| 179 |
+ return not ((pr.text:find("IMG%[")) or (pr.ans:find("IMG%[")))
|
|
| 180 | 180 |
end) |
| 181 | 181 |
io.write(string.format( |
| 182 | 182 |
"%d prompts are ready for review.\nHow many to review in this session? ", #ctrt |
| ... | ... |
@@ -70,9 +70,10 @@ end |
| 70 | 70 |
]] |
| 71 | 71 |
local function toreviewlist(deck, filter) |
| 72 | 72 |
local ctrt = {}
|
| 73 |
+ local ff = filter or alwaystrue |
|
| 73 | 74 |
for i, cg in ipairs(deck) do |
| 74 | 75 |
for j, pr in ipairs(cg) do |
| 75 |
- if should(pr) and (filter or alwaystrue)(pr) then |
|
| 76 |
+ if should(pr) and ff(pr) then |
|
| 76 | 77 |
table.insert(ctrt, { i, j })
|
| 77 | 78 |
end |
| 78 | 79 |
end |
| 79 | 80 |