cecini
77a94c8a45
Update rslib dep nom
2020-12-15 08:19:52 +00:00
Damien Elmes
ae742417a1
fix filtered decks not honoring sort order
...
https://forums.ankiweb.net/t/2-1-36-filtered-decks-bug/5649/
2020-12-09 22:50:49 +10:00
Damien Elmes
00f827f976
fix duplicate search not checking first field
...
Thanks to abdo for the initial solution. Closes #838
2020-11-30 09:27:10 +10:00
RumovZ
6c3c617b64
Comment fix
2020-11-27 22:12:36 +01:00
RumovZ
59bbbd53b8
Revert implementation of r: prefix
2020-11-27 22:10:37 +01:00
Damien Elmes
775dae874d
fix new Clippy lints
2020-11-25 09:12:19 +10:00
Damien Elmes
29b3ee13e8
fix clippy lints
2020-11-24 20:13:05 +10:00
RumovZ
a6fe08f662
Revert changes to normalisation handling
...
Handle norm calls individually in write_search_node_to_sql again.
2020-11-18 23:46:27 +01:00
RumovZ
6290e09b89
Implement the prefix r: to search for raw input
2020-11-18 22:26:51 +01:00
RumovZ
f05e70a03e
Merge branch 'master' into rework-search-parser
...
Conflicts:
rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
RumovZ
add3fea6c3
Make - escapable
...
Treat unescaped - as before but make it escapable with \ to distinguish
the literal from the negator.
2020-11-17 18:38:27 +01:00
RumovZ
64bf14f1e9
Split unescaping between parser and writer
...
* Unescape wildcards in writer instead of parser.
* Move text conversion functions to text.rs.
* Implicitly norm when converting text.
* Revert to using collection when comparing tags but add escape support.
2020-11-17 12:49:37 +01:00
abdo
35bfd20240
Make dupe search operate on non-stripped text
...
See https://github.com/ankitects/anki/pull/822/
2020-11-16 04:01:04 +03:00
RumovZ
c4bea9e3c0
Use enforced re to parse deck
...
Fix write_deck not recognising escaped deck name separators:
\:\: -> ::
2020-11-15 21:32:36 +01:00
RumovZ
065d9e939b
Annotate RegEx for invalid-escape check
2020-11-15 14:22:16 +01:00
RumovZ
e1ddc3d63a
Extend tests for new search parsing
...
(Also fix indentation)
2020-11-15 12:00:20 +01:00
RumovZ
6d4d1369d4
Fix escape check for escaped backslash
2020-11-15 11:57:11 +01:00
RumovZ
2e54817870
Move whitespace check for tags from to sqlwriter
...
Instead of not parsing a tag containing whitespace, check for spaces
when writing sql and if there are any, explicitly match nothing.
2020-11-15 11:54:21 +01:00
RumovZ
022efd5956
Always use regex for tag search
...
Don't distinguish between the glob and no-glob cases when comparing
tags but always use regexp. Thus, avoid problems with SQL wildcards in
registered tags.
2020-11-15 09:52:00 +01:00
RumovZ
d65b1f96f7
Fix tests for new search parsing (and reformat)
2020-11-14 19:13:09 +01:00
RumovZ
59f0010783
Fix whitespace in write_tag and parser/whitespac0
2020-11-14 19:10:56 +01:00
RumovZ
baf3dd9dde
For deck searches, unescape quotes only
...
For now, revert to the old handling of deck names using text_to_re from
text.rs and have parser.rs only unescape quotes.
2020-11-14 19:06:37 +01:00
RumovZ
c27175238c
Fix 'escaped' parser for empty string
...
Fix a bug where 'escaped' parsers (nom) accepted the empty
string by wrapping them in 'verify' parsers.
2020-11-14 18:28:24 +01:00
RumovZ
e09486d088
Fix bugs and inconsistencies in the search parser
2020-11-12 17:27:50 +01:00
Andreas Reis
81d6d21ae3
cleanup / renames
...
・ soundRegexps → sound_regexps
・ htmlRegexps → html_media_regexps
・ HTML_TAGS → HTML_MEDIA_TAGS
・ escapeImages → escape_media_filenames + alias
・ strip_html_preserving_image_filenames → strip_html_preserving_media_filenames
2020-11-10 14:53:04 +01:00
Damien Elmes
791894d2d0
fix new clippy lints
2020-10-09 21:35:53 +10:00
Damien Elmes
61bbe6a604
fix * handling in unqualifed text as well
...
https://forums.ankiweb.net/t/anki-2-1-desktop-searching-with-only-when-limited-to-a-field/3789/4
2020-09-29 21:18:19 +10:00
Damien Elmes
2e7c71b415
fix escaping of * in field search
...
mentioned in
https://github.com/ankitects/anki/pull/769
2020-09-27 16:04:08 +10:00
Damien Elmes
4d66bafc51
stop is:due gathering learning cards that are not due yet
...
https://forums.ankiweb.net/t/how-to-avoid-rebuilding-filtered-decks-to-skip-learning-cards-steps/3551/
2020-09-21 11:41:54 +10:00
Damien Elmes
f32d773e25
set_deck()
2020-09-03 17:42:46 +10:00
Damien Elmes
f7d4bf8489
support did:[deck id] search
2020-09-03 16:43:22 +10:00
Damien Elmes
7c169daa95
move card sorting and resetting to backend
2020-09-03 15:54:15 +10:00
Damien Elmes
396081d329
move filtered deck empty/fill to backend
...
emptying of individual card ids still to be done
2020-09-02 17:56:23 +10:00
Damien Elmes
988b3c00c1
move unbury/unsuspend routines into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
4894025cfc
add separate sched/user bury searches, and fix bury enums
2020-09-01 10:24:38 +10:00
Damien Elmes
b9f6bde2dc
catch leading/trailing boolean operators
...
https://forums.ankiweb.net/t/is-it-only-me-anki-giving-corrupt-collection-error/2424/20
2020-08-27 09:59:29 +10:00
Damien Elmes
cb821a9e3c
fix globs not working in bulk tag add/remove
2020-08-17 18:14:00 +10:00
Damien Elmes
3da7884e19
reject double comma in id list
...
https://forums.ankiweb.net/t/anki-2-1-29-and-below-2-small-bugs/1496
2020-07-29 13:05:34 +10:00
Damien Elmes
d35bc85ead
is:review should include relearning cards
...
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/36
This issue appears to have existed since the V2 scheduler was
introduced - the old Python search code was ignoring Relearn as well.
2020-07-09 11:07:50 +10:00
Damien Elmes
8cfafdbc32
supported edited:n
...
https://forums.ankiweb.net/t/feature-request-advanced-broswer-search-by-edited/268
2020-07-01 10:17:57 +10:00
Damien Elmes
06d9f64dea
lint fixes
2020-06-29 15:53:56 +10:00
Damien Elmes
4be8e7923a
fix partially quoted text not handling escaped quotes
...
https://forums.ankiweb.net/t/how-to-search-for-cards-containing-quotes/500/10
2020-06-29 15:48:01 +10:00
Damien Elmes
4d88b6521d
cards added graph
2020-06-29 15:48:01 +10:00
Damien Elmes
1e9901e9bd
experiment with exposing raw card/revlog data to frontend
2020-06-29 15:48:00 +10:00
Damien Elmes
6d7be475e6
catch invalid regex in search
...
https://github.com/ankitects/anki/pull/652
2020-06-09 11:46:07 +10:00
Damien Elmes
c78e8425aa
automatically omit notes or cards table when possible
2020-05-19 11:27:02 +10:00
Damien Elmes
c77bc74a2b
rename SortMode arg to match enum
2020-05-12 21:13:34 +10:00
Damien Elmes
0a87b1ef2c
support disabling unicode normalization in notes
2020-05-12 21:13:34 +10:00
Damien Elmes
7ef72aba04
use the backend for the deck due tree
...
- approx 3x faster on a large test deck
- counts are no longer capped to 1000 in the tree
2020-05-12 21:13:33 +10:00
Damien Elmes
46e0469991
rework aux table sorting
...
Instead of inserting text into the aux table and sorting on the fly
(which does a binary sort), we insert the ids in unicase-sorted order,
and then sort based on the automatically assigned rowids - giving
us faster sorts, and proper unicase folding.
2020-05-12 21:13:33 +10:00