dkl9 commited on 2024-1 11:22:27
Showing 1 changed files, with 0 additions and 3 deletions.
| ... | ... |
@@ -43,9 +43,6 @@ function Prompt:text() |
| 43 | 43 |
local qs, as = self.ind[1], self.ind[2] |
| 44 | 44 |
local qe = (self.card.note:find(";;", qs) or #self.card.note + 1) - 1
|
| 45 | 45 |
local ae = (self.card.note:find(";;", as) or #self.card.note + 1) - 1
|
| 46 |
- print("context is " .. self.card.note:sub(1, ce - 2) .. " from 1 to " .. ce)
|
|
| 47 |
- print("question is " .. self.card.note:sub(qs, qe) .. " from " .. qs .. " to " .. qe)
|
|
| 48 |
- print("answer is " .. self.card.note:sub(as, ae) .. " from " .. as .. " to " .. ae)
|
|
| 49 | 46 |
return self.card.note:sub(1, ce - 2) .. self.card.note:sub(qs, qe):gsub("{([^}]+)}", "%1") .. self.card.note:sub(as, ae):gsub("{([^}]+)}", "%%A")
|
| 50 | 47 |
elseif self.card.ct == "seq" then |
| 51 | 48 |
return (self.card.note:sub(1, self.ind - 1) .. "%A"):gsub(";;", "")
|
| 52 | 49 |