mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
Merge branch 'master' of github.com:dae/libanki
This commit is contained in:
commit
2433da7ef5
1 changed files with 2 additions and 2 deletions
|
@ -264,10 +264,10 @@ select id from cards where nid in (select id from notes where mid = ?)""",
|
|||
|
||||
def renameField(self, m, field, newName):
|
||||
self.col.modSchema()
|
||||
pat = "({{|[:#^/])%s(}})"
|
||||
pat = r'{{([:#^/]|[^:#/^}][^:}]*?:|)%s}}'
|
||||
def wrap(txt):
|
||||
def repl(match):
|
||||
return match.group(1) + txt + match.group(2)
|
||||
return '{{' + match.group(1) + txt + '}}'
|
||||
return repl
|
||||
for t in m['tmpls']:
|
||||
for fmt in ('qfmt', 'afmt'):
|
||||
|
|
Loading…
Reference in a new issue