mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 14:47:12 -05:00
* Add new `card_rendering` mod
Parses a text with av/tts tags and strips or extracts tags.
* Replace old `extract_av_tags` and `strip_av_tags`
... with new `card_rendering` mod
* ressource -> resource
* Add AV prettifier for use in browser table
* Accept String in av tag routines
... and avoid redundant writes if no changes need to be made.
* add benchmarking with criterion; make links test optional (dae)
cargo install cargo-criterion, then run ./bench.sh
* performance comparison: creating HashMap up front (dae)
the previous solution:
anki_tag_parse time: [1.8401 us 1.8437 us 1.8476 us]
this solution:
anki_tag_parse time: [2.2420 us 2.2447 us 2.2477 us]
change: [+21.477% +21.770% +22.066%] (p = 0.00 < 0.05)
Performance has regressed.
* Revert "performance comparison: creating HashMap up front" (dae)
This reverts commit f19126a2f1.
* add missing header
* Write error message if tts lang is missing
* `Tag` -> `Directive`
53 lines
968 B
Rust
53 lines
968 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
#![deny(unused_must_use)]
|
|
|
|
pub mod adding;
|
|
pub mod backend;
|
|
mod backend_proto;
|
|
pub mod browser_table;
|
|
pub mod card;
|
|
pub mod card_rendering;
|
|
pub mod cloze;
|
|
pub mod collection;
|
|
pub mod config;
|
|
pub mod dbcheck;
|
|
pub mod deckconfig;
|
|
pub mod decks;
|
|
pub mod error;
|
|
pub mod findreplace;
|
|
pub mod i18n;
|
|
pub mod latex;
|
|
pub mod links;
|
|
pub mod log;
|
|
mod markdown;
|
|
pub mod media;
|
|
pub mod notes;
|
|
pub mod notetype;
|
|
pub mod ops;
|
|
mod preferences;
|
|
pub mod prelude;
|
|
pub mod revlog;
|
|
pub mod scheduler;
|
|
pub mod search;
|
|
pub mod serde;
|
|
mod stats;
|
|
pub mod storage;
|
|
mod sync;
|
|
pub mod tags;
|
|
pub mod template;
|
|
pub mod template_filters;
|
|
pub mod text;
|
|
pub mod timestamp;
|
|
pub mod types;
|
|
pub mod undo;
|
|
pub mod version;
|
|
|
|
use std::env;
|
|
|
|
use lazy_static::lazy_static;
|
|
|
|
lazy_static! {
|
|
pub(crate) static ref PYTHON_UNIT_TESTS: bool = env::var("ANKI_TEST_MODE").is_ok();
|
|
}
|