mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
don't truncate sort field anymore, since we display it in the gui
This commit is contained in:
parent
e8d6714130
commit
84d59e4b01
4 changed files with 3 additions and 8 deletions
|
@ -2,8 +2,6 @@
|
|||
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
MATURE_THRESHOLD = 21
|
||||
|
||||
# whether new cards should be mixed with reviews, or shown first or last
|
||||
NEW_CARDS_DISTRIBUTE = 0
|
||||
NEW_CARDS_LAST = 1
|
||||
|
@ -22,9 +20,6 @@ REV_CARDS_OLD_FIRST = 0
|
|||
REV_CARDS_NEW_FIRST = 1
|
||||
REV_CARDS_RANDOM = 2
|
||||
|
||||
# maximum characters to store in sort cache
|
||||
SORT_FIELD_LEN = 20
|
||||
|
||||
# Labels
|
||||
##########################################################################
|
||||
|
||||
|
|
|
@ -431,8 +431,7 @@ select id from cards where fid in (select id from facts where mid = ?)""",
|
|||
for f in model.fields:
|
||||
if f['uniq'] and fields[f['ord']]:
|
||||
r.append((fid, mid, fieldChecksum(fields[f['ord']])))
|
||||
r2.append((stripHTML(fields[model.sortIdx()])[
|
||||
:SORT_FIELD_LEN], fid))
|
||||
r2.append((stripHTML(fields[model.sortIdx()]), fid))
|
||||
if csum:
|
||||
self.db.execute("delete from fsums where fid in "+sfids)
|
||||
self.db.executemany("insert into fsums values (?,?,?)", r)
|
||||
|
|
|
@ -280,7 +280,6 @@ select id from facts where mid = ?)""" % " ".join(map), self.id)
|
|||
##########################################################################
|
||||
# - maps are ord->ord, and there should not be duplicate targets
|
||||
# - newModel should be self if model is not changing
|
||||
# - interface should ensure there's at least one remaining card
|
||||
|
||||
def changeModel(self, fids, newModel, fmap, cmap):
|
||||
self.deck.modSchema()
|
||||
|
|
|
@ -4,3 +4,5 @@ Behaviour is a little different from standard Mustache:
|
|||
- {{text}} returns text verbatim with no HTML escaping
|
||||
- {{{text}}} strips an outer span tag
|
||||
- partial rendering is disabled for security reasons
|
||||
- certain keywords like 'cloze' are treated specially
|
||||
|
||||
|
|
Loading…
Reference in a new issue