Commit graph

725 commits

Author SHA1 Message Date
Damien Elmes
4043bd90bb Merge pull request #823 from RumovZ/rework-search-parser
Rework search parser
2020-11-20 16:22:12 +10:00
Damien Elmes
717969862b mark created deck parents as modified
Thanks to cecini for the original report. Closes #831:
https://github.com/ankitects/anki/pull/831
2020-11-19 08:48:43 +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
Damien Elmes
2f1d5cd38b move ftl into top level ftl/ folder; make it source of truth for aqt
This avoids the need to modify the external repo before new strings
can be used in aqt.
2020-11-18 16:20:58 +10:00
Damien Elmes
d1a23fd65a fix browser updateTitle() 2020-11-18 13:40:21 +10:00
Damien Elmes
7e655614b2 fix remaining _() references; remove unused imports 2020-11-18 12:43:46 +10: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
96845421d8 Fix RE in to_custom_re of text.rs
Match every single (potentially escaped) character of the string, so
they can be escaped properly.
2020-11-17 15:39:54 +01:00
Damien Elmes
dac8daf113 begin plural string migration 2020-11-17 23:29:08 +10: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
Damien Elmes
1781e83252 merge pylib references 2020-11-17 19:23:06 +10:00
Damien Elmes
066b1498ae merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10: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
Damien Elmes
fd4c1edc7f add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10: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
Damien Elmes
a4af59fc4d format_fix -> format; rename svelte-check for consistency 2020-11-12 20:19:32 +10:00
Damien Elmes
f83f0f08e2 drop El Capitan support 2020-11-12 20:03:41 +10:00
Damien Elmes
5ab4cbfd63 prep for i18n updates
Update scripts will be split into separate repo
2020-11-11 16:18:28 +10:00
Damien Elmes
8147c9996a Merge pull request #793 from nwwt/object-audio-tags-support
Audio & object tag support
2020-11-11 10:33:31 +10: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
434fdae4f0 Merge pull request #805 from cecini/duecounts
align rslib get_subnode impl with anki pythonapi find_deck_in_tree
2020-11-06 10:57:49 +10:00
Damien Elmes
aaa950f66c handle notes with invalid utf8 2020-11-06 10:21:51 +10:00
Damien Elmes
e049062147 fix missing buildinfo on Windows 2020-11-05 11:21:27 +10:00
Damien Elmes
f738053c35 fixes for consuming rust lib from external repo 2020-11-04 19:20:49 +10:00
Damien Elmes
f24d80bac5 update to latest fluent libs, and integrate maximum digit handling
We now limit number of digits in our formatter, instead of relying
on an upstream patch.
2020-11-03 14:10:45 +10:00
Damien Elmes
a001029961 add shallow_since to a bunch of git deps 2020-11-03 11:42:11 +10:00
Damien Elmes
6cde50e475 ues native roots with rustls 2020-11-03 10:42:20 +10:00
Damien Elmes
c6e6c8a54d update env_logger, and minor dep updates 2020-11-03 09:04:57 +10:00
Damien Elmes
c62e2e1e58 reqwest was missing default-features = false
Still needed until we fix OpenSSL compilation on Linux
2020-11-02 21:53:24 +10:00
Damien Elmes
f620bfc3bf update rusqlite and pin-project
Thanks to Alan for the heads up
2020-11-02 18:26:19 +10:00
Damien Elmes
db0e0e78f8 update cargo deps; add script to copy them from rslib/ 2020-11-02 18:17:26 +10:00
Damien Elmes
7c27c4b9a0 move backend.proto into rslib/ 2020-11-02 16:28:31 +10:00
Damien Elmes
3632c22feb clippy lint 2020-11-01 16:19:08 +10:00
Damien Elmes
cfbbb69648 trailing newline .ftl check can happen at build time
Removes the need to build ripgrep for CI
2020-11-01 14:59:45 +10:00
Damien Elmes
f9171eb3d3 remove old makefiles 2020-11-01 14:41:01 +10:00
Damien Elmes
ce3b08ac58 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
cecini
e12c09bd11 align rslib get_subnode impl with anki pythonapi find_deck_in_tree, fix nestdeck due counts issue 2020-10-29 23:53:26 +08:00
Andreas Reis
c77ac81e9d Add audio & object tags to media check
Makes the media check recognize files in <audio> and <object> tags as used.

They've been observed/supported by the WebView (checked: Anki, AnkiDroid) since just about forever already and are extremely useful if one knows a thing about web dev.
2020-10-25 13:09:57 +01:00