mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
strip clozes before stripping combining characters
find_notes_sc time: [1.0398 s 1.0405 s 1.0412 s]
change: [-6.1276% -6.0323% -5.9401%] (p = 0.00 < 0.05)
Performance has improved.
This commit is contained in:
parent
faa5ff8315
commit
ae7d0dd2a4
1 changed files with 3 additions and 3 deletions
|
|
@ -121,12 +121,12 @@ fn add_process_text_function(db: &Connection) -> rusqlite::Result<()> {
|
|||
|ctx| {
|
||||
let mut text = Cow::from(ctx.get_raw(0).as_str()?);
|
||||
let opt = ctx.get_raw(1).as_i64()? as u8;
|
||||
if opt & 1 != 0 {
|
||||
text = text.map_cow(without_combining);
|
||||
}
|
||||
if opt & 2 != 0 {
|
||||
text = text.map_cow(strip_clozes);
|
||||
}
|
||||
if opt & 1 != 0 {
|
||||
text = text.map_cow(without_combining);
|
||||
}
|
||||
Ok(text.get_owned())
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue