mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
![]() * typeanswer: fix cleanup Fix: Add prepare_expected back in for the 'nothing typed' & 'correctly typed' cases. This also makes expected_original redundant again. Style: %s/provided/typed/g Style: rename one ch → c Testcase: whitespace_is_trimmed: added a check for the "correctly typed" path and renamed it to tags_removed (there's no whitespace?) Testcase: empty_input_shows_as_code: changed to also check that tags get trimmed * [type:nc] – ignores combining characters Adds a comparison variant to [type] which ignores when combining characters of the expected field are missing from the provided input. It still shows these characters in the 'expected' line for reference. It's useful for languages with e.g. diacritics that are required for reference (such as in dictionaries), but rarely actually learned or used in everyday writing. Among these languages: Arabic, Hebrew, Persian, Urdu. The bool 'combining' controls it as new final parameter of both relevant compare_answer functions. On the Python side, it's set to true by default. Use on the note templates: [type:nc:field] (only the front needs to include :nc) This also removes the need to have both variants of words/sentences present as separate fields, to show them redundantly, etc. * typeanswer: simplify by using nfkd throughout Requires adjusting two testcases, but both render exactly the same in Anki itself. On NFC vs. NKFD: https://stackoverflow.com/a/77432079 * typeanswer: 'simplify' by removing normalize_typed (requiring a bool parameter) I'd prefer to keep this extra method. * typeanswer: micro-optimize vectors Should get rid of most relocations, at the expense of over-allocating. On Vec's (String's) behavior: https://stackoverflow.com/a/72787776 * Mark `combining` as private typeCorrect is not marked as private either, but we can at least do the right thing for newly-added code. * Revert "typeanswer: micro-optimize vectors" This reverts commit |
||
---|---|---|
.. | ||
anki | ||
.clang-format | ||
.top_level | ||
README.md |
Protobuf files defining the interface the frontend and backend components use to talk to each other, and how Anki stores some of the data inside its SQLite database. These files are used to generate Rust, Python and TypeScript bindings.