Commit graph

11 commits

Author SHA1 Message Date
Damien Elmes
2ba8c41fec replace nbsp with standard space when stripping html
fixes https://anki.tenderapp.com/discussions/ankidesktop/1952-duplicate-not-detected-on-paste
2013-07-11 21:23:13 +09:00
Damien Elmes
0dceb0ce22 round() doesn't convert to int 2013-05-15 23:37:27 +09:00
Mike Blume
dcf097b55f use futuristic division
Python used to use C-style division, where division of two ints was
truncated, and division involving a float resulted in a float.

This is confusing, because you often can't tell from looking at a
line of code in isolation what sort of division it's supposed to do.

With 'from __future__ import division' Python ensures that division is
always explicit.

// means (floored) integer division
/ means float division

regardless of argument types.

This should make the source a bit clearer now, as well as removing one
obstacle if Anki is ever ported to Python 3.
2013-05-05 11:09:16 -07:00
Damien Elmes
ed9fba954e handle extra attributes in imgs in condition repl (#700) 2013-04-11 18:34:53 +09:00
Damien Elmes
0b7344c84f when showing time with no decimal, round not floor 2013-04-01 14:48:17 +09:00
Damien Elmes
fa07268763 don't allow invalid chars in file export (#694) 2013-02-20 15:12:07 +09:00
Damien Elmes
ea89be5f4a make sure we encode data as utf8 before checksumming 2013-01-08 10:42:15 +09:00
Damien Elmes
8cf072c735 preserve image filenames when stripping html
- also do this for the sort field
2012-12-24 14:08:42 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00
Damien Elmes
2095e5c4b3 strip HTML when calculating field checksum (users will need to checkDB) 2012-12-21 20:51:45 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00