mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add a filter for formatQA()
This commit is contained in:
parent
0d0b9fc81e
commit
1d5ee36314
1 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@ from anki.utils import genID, canonifyTags
|
||||||
from anki.fonts import toPlatformFont
|
from anki.fonts import toPlatformFont
|
||||||
from anki.utils import parseTags, hexifyID, checksum
|
from anki.utils import parseTags, hexifyID, checksum
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
|
from anki.hooks import runFilter
|
||||||
from copy import copy
|
from copy import copy
|
||||||
|
|
||||||
def alignmentLabels():
|
def alignmentLabels():
|
||||||
|
@ -151,7 +152,7 @@ def formatQA(cid, mid, fact, tags, cm):
|
||||||
html = format % fields
|
html = format % fields
|
||||||
except (KeyError, TypeError, ValueError):
|
except (KeyError, TypeError, ValueError):
|
||||||
html = _("[invalid question/answer format]")
|
html = _("[invalid question/answer format]")
|
||||||
d[type] = html
|
d[type] = runFilter("formatQA", html, type, cid, mid, fact, tags, cm)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
# Model table
|
# Model table
|
||||||
|
|
Loading…
Reference in a new issue