mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Anki is a smart spaced repetition flashcard program
![]() * 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 |
||
---|---|---|
.buildkite | ||
.cargo | ||
.config | ||
.github/ISSUE_TEMPLATE | ||
.vscode.dist | ||
build | ||
cargo | ||
docs | ||
ftl | ||
proto | ||
pylib | ||
python | ||
qt | ||
rslib | ||
tools | ||
ts | ||
.deny.toml | ||
.dockerignore | ||
.dprint.json | ||
.eslintrc.cjs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.isort.cfg | ||
.mypy.ini | ||
.pylintrc | ||
.ruff.toml | ||
.rustfmt-empty.toml | ||
.rustfmt.toml | ||
.version | ||
Cargo.lock | ||
Cargo.toml | ||
check | ||
CONTRIBUTORS | ||
LICENSE | ||
ninja | ||
package.json | ||
pkgkey.asc | ||
pyproject.toml | ||
README.md | ||
run | ||
run.bat | ||
rust-toolchain.toml | ||
SECURITY.md | ||
yarn | ||
yarn.bat | ||
yarn.lock |
Anki
This repo contains the source code for the computer version of Anki.
About
Anki is a spaced repetition program. Please see the website to learn more.
Getting Started
Anki Betas
If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas
Developing
For more information on building and developing, please see Development.
Contributing
Want to contribute to Anki? Check out the Contribution Guidelines.
Anki Contributors
License
Anki's license: LICENSE