Damien Elmes
b48451610f
fix sync indicator turning blue after startup sync
...
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/26?u=dae
2020-12-22 10:46:50 +10:00
Damien Elmes
ebeae9a5a0
don't pass BUILDINFO into build script
...
It was causing the build script to be recompiled each time a commit was
made, even though buildinfo.txt was not changing.
2020-12-21 16:04:29 +10:00
Damien Elmes
dee0a2fc18
fix reposition not being applied in browser sort order
...
https://forums.ankiweb.net/t/reposition-function-not-working/5817
Also changed id->cid in the non-sorting case, as otherwise when
using all_searched_cards() on a sorted list, the results will be wrong.
2020-12-16 10:58:46 +10:00
Damien Elmes
75cbbea048
Merge pull request #848 from cecini/rslibdep
...
Update Rust deps, and nom to v6
2020-12-15 20:04:02 +10:00
cecini
d37ea0f5f7
Update rslib dep nom
2020-12-15 08:19:52 +00:00
abdo
197d665de8
Fix duplicate check not decoding entities
...
This is a regression introduced in 358d0f957e
See https://forums.ankiweb.net/t/bug-duplicates-not-detecting-on-paste/5753
2020-12-14 15:13:00 +03:00
Damien Elmes
77c9db5bba
plural rules and decimal separator should use bundle's language
...
Instead of providing the list of languages in preferred order, when
creating a bundle we need to specify the bundle language as the first
language, so that the correct plural rules are used. Fluent's docs
are misleading here; I will submit a PR to fix them.
The old behaviour caused:
https://forums.ankiweb.net/t/bug-in-review-intervals-for-some-languages-in-number-of-cards/5744
2020-12-14 14:23:49 +10:00
Damien Elmes
a9ea8e11a2
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
1cb3984049
deck renaming tweaks
...
- normalize name prior to creating parents
- always mark modified
https://github.com/ankitects/anki/pull/831#issuecomment-730064858
2020-11-30 10:09:23 +10:00
Damien Elmes
009906d0c2
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
540d52c471
Comment fix
2020-11-27 22:12:36 +01:00
RumovZ
0c9ad7e952
Revert implementation of r:
prefix
2020-11-27 22:10:37 +01:00
Damien Elmes
780f32b8ae
fix new Clippy lints
2020-11-25 09:12:19 +10:00
Damien Elmes
3923f56cbf
fix clippy lints
2020-11-24 20:13:05 +10:00
Damien Elmes
d7cded4ae1
fix compilation of rslib outside Bazel
...
fixes code completion
2020-11-24 18:51:19 +10:00
RumovZ
347c547e10
Add tests for conversion functions in text.rs
2020-11-20 09:45:53 +01:00
RumovZ
0fc84d19b2
Replace text.rs/text_to_re with text.rs/to_re
2020-11-20 09:23:25 +01:00
Damien Elmes
e23d40e850
Merge pull request #823 from RumovZ/rework-search-parser
...
Rework search parser
2020-11-20 16:22:12 +10:00
Damien Elmes
7c57e5044b
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
785540bddc
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
6e51bad7db
Implement the prefix r:
to search for raw input
2020-11-18 22:26:51 +01:00
RumovZ
c185fb966b
Merge branch 'master' into rework-search-parser
...
Conflicts:
rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
RumovZ
b09a398d2d
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
91873d68eb
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
RumovZ
8c02c6e205
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
358d0f957e
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
7c5cf6d18b
Use enforced re to parse deck
...
Fix write_deck not recognising escaped deck name separators:
\:\: -> ::
2020-11-15 21:32:36 +01:00
RumovZ
a6628709c5
Annotate RegEx for invalid-escape check
2020-11-15 14:22:16 +01:00
RumovZ
a16d271eb0
Extend tests for new search parsing
...
(Also fix indentation)
2020-11-15 12:00:20 +01:00
RumovZ
ae01a5b3a2
Fix escape check for escaped backslash
2020-11-15 11:57:11 +01:00
RumovZ
63cc877023
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
57787368a1
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
9e53481003
Fix tests for new search parsing (and reformat)
2020-11-14 19:13:09 +01:00
RumovZ
836977aac8
Fix whitespace in write_tag and parser/whitespac0
2020-11-14 19:10:56 +01:00
RumovZ
3949996728
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
b186e61e54
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
0cff65e5a8
Fix bugs and inconsistencies in the search parser
2020-11-12 17:27:50 +01:00
Damien Elmes
e99c0dbe15
Merge pull request #793 from nwwt/object-audio-tags-support
...
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
e68a40f13e
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
96f77b4b5e
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
c157ccb3f5
handle notes with invalid utf8
2020-11-06 10:21:51 +10:00
Damien Elmes
3f47ff9abd
fix missing buildinfo on Windows
2020-11-05 11:21:27 +10:00
Damien Elmes
3c12cb1600
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
0cf964b16d
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
aea0a6fcc6
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
2606a8a489
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
6e9aaad11e
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
abdo
97ea14449f
Ensure non-empty names
...
https://github.com/ankitects/anki/pull/801/
2020-10-22 16:11:06 +03:00
abdo
55f1d3773f
Strip double quotes from names
...
Strip double quotes from all kinds of names
https://github.com/ankitects/anki/pull/798
2020-10-21 21:48:49 +03:00
Damien Elmes
c96784c0eb
fix new clippy lints
2020-10-09 21:35:53 +10:00