mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -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):
|
def renameField(self, m, field, newName):
|
||||||
self.col.modSchema()
|
self.col.modSchema()
|
||||||
pat = "({{|[:#^/])%s(}})"
|
pat = r'{{([:#^/]|[^:#/^}][^:}]*?:|)%s}}'
|
||||||
def wrap(txt):
|
def wrap(txt):
|
||||||
def repl(match):
|
def repl(match):
|
||||||
return match.group(1) + txt + match.group(2)
|
return '{{' + match.group(1) + txt + '}}'
|
||||||
return repl
|
return repl
|
||||||
for t in m['tmpls']:
|
for t in m['tmpls']:
|
||||||
for fmt in ('qfmt', 'afmt'):
|
for fmt in ('qfmt', 'afmt'):
|
||||||
|
|
Loading…
Reference in a new issue