Commit Graph

5434 Commits

Author SHA1 Message Date
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
Henrik Giesel
a7b5a7efe1 Improve ts hooks to allow for asynchronous actions
* reviewer ts hooks may now return a promise, which are then waited upon with Promise.all
* this does not break old ts hooks, as Promise.all allows for non-Promises in its array
2020-11-15 21:16:06 +01:00
Henrik Giesel
4229f21084 Include default MathJax packages
* by default load all the default tex-chtml packages, which additionally include:
  * require: using \require{package-name} to load a package
  * autoload: using a command from a different package automatically loads it
  * configmacros: allows for definition of predefined macros
2020-11-15 20:56:50 +01:00
RumovZ
a6628709c5 Annotate RegEx for invalid-escape check 2020-11-15 14:22:16 +01:00
Henrik Giesel
80232f4d33 Load require package in Mathjax 2020-11-15 13:58:51 +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
Damien Elmes
9f97baa3e2 Merge branch 'mathjax3' 2020-11-15 20:24:50 +10:00
Damien Elmes
8a80ffe53a add rule to copy mathjax from node_modules 2020-11-15 20:22:28 +10: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
d1ee507b3a Update frontend test to new escape handling 2020-11-15 09:39:10 +01:00
Damien Elmes
9feccc785f ignore incorrect clock in dev mode 2020-11-15 18:29:16 +10:00
Damien Elmes
e9fdb5600c use ring on Linux; native-tls on other platforms
Python wheels on Linux require statically linked SSL libraries.
We were previously relying on the native-tls-vendored feature in
reqwest, but that does not work with Bazel, as openssl-src makes
assumptions that break when sandboxed. The static libs distributed
by distros like Ubuntu fail to link, and while we could potentially
build OpenSSL ourselves, we'd then need to keep it up to
date.

On Windows and Mac however, native-tls is preferable to ring, as it
allows us to get free updates from the OS, and results in
a smaller library.

Rust currently only supports platform-specific features in nightly,
and cargo-raze does not have support for them, so we currently need
to override the generated build file with a hand-crafted one that
specifies the relative features/deps for each platform.

update.py has been updated to automatically keep the version numbers
in this file up to date, so it should hopefully not prove too hard to
maintain going forward.
2020-11-15 15:25:28 +10:00
Damien Elmes
4bf93a9af0 add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10:00
Damien Elmes
a0c658621b update Rust deps 2020-11-15 13:31:24 +10:00
RumovZ
8d24fb89bf Update frontend search escapes to new parsing 2020-11-14 20:37:40 +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
Henrik Giesel
afc7bdf642 Add Mathjax filegroup 2020-11-14 14:14:25 +01:00
Henrik Giesel
6104ea26fb Remove @types/mathjax as it is for MathJax 2 2020-11-14 14:14:25 +01:00
Henrik Giesel
aa44d64513 Add moving MathJax3 into mathjax directory to build process 2020-11-14 14:14:25 +01:00
Henrik Giesel
6d4ff1212d Rip out MathJax 2 and setup MathJax 3 environment 2020-11-14 14:14:25 +01:00
Henrik Giesel
c5cfbfa1ab Update MathJax2 config to MathJax3 config
Used: https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html
2020-11-14 14:14:25 +01:00
Damien Elmes
f8a9df2c8d update rules_rust 2020-11-14 22:15:43 +10:00
Damien Elmes
8e93b0ee38 use full path in backend_pb2 import 2020-11-13 14:21:21 +10:00
Damien Elmes
52ca4ab854 audio doc updates
[skip ci]
2020-11-13 09:14:12 +10:00
RumovZ
0cff65e5a8 Fix bugs and inconsistencies in the search parser 2020-11-12 17:27:50 +01:00
Damien Elmes
410987f0a6 relative js package paths 2020-11-12 21:07:59 +10:00
Damien Elmes
b71f55dcc5 make 'bazel run ts:format' work
We're cheating a bit by having it fix files in qt's data folder
as well, but this makes it easier to share the config file.
2020-11-12 20:49:00 +10:00
Damien Elmes
5bb3d7c114 format_fix -> format; rename svelte-check for consistency 2020-11-12 20:19:32 +10:00
Damien Elmes
bd6fb9b234 cleaning note is not specific to Windows 2020-11-12 20:06:35 +10:00
Damien Elmes
0489c92908 drop El Capitan support 2020-11-12 20:03:41 +10:00
Damien Elmes
eed9ca9885 export runtime js licenses 2020-11-12 20:03:41 +10:00
Damien Elmes
2b9d3a808d update ts deps 2020-11-12 20:03:41 +10:00
Damien Elmes
7efcc2d5d6 dump pypi licenses of runtime deps 2020-11-12 20:03:41 +10:00
Damien Elmes
2897707263 update Python deps 2020-11-12 20:03:41 +10:00
Damien Elmes
b0aedd6c76 orjson was missing from dep list; drop 32 bit compat 2020-11-12 20:03:41 +10:00
Damien Elmes
835c29f8ca dump crate licenses as part of update run 2020-11-12 20:03:41 +10:00
Damien Elmes
1b3922d6a5 rs dep updates 2020-11-12 20:03:41 +10:00
Damien Elmes
113e862084
Merge pull request #820 from abdnh/patch-1
Update Windows docs
2020-11-12 13:57:03 +10:00
abdo
1d5b2df196
Update Windows docs
See https://github.com/ankitects/anki/pull/819/
2020-11-12 04:01:08 +03:00
Damien Elmes
e0550b6084 update translations 2020-11-12 08:55:56 +10:00
Damien Elmes
81b9a3194e fix some unwanted leading space in i18n keys 2020-11-12 08:55:26 +10:00
Damien Elmes
0b06d25375 fix typo
[skip ci]
2020-11-11 22:17:37 +10:00
Damien Elmes
8ca023048a add coding specifier to anki/__init__.py
older gettext versions will complain otherwise (was breaking Windows CI)
2020-11-11 21:51:11 +10:00
Damien Elmes
5536ffb343 update qt/ to 3.8 as well 2020-11-11 21:37:36 +10:00
Damien Elmes
0fcccae6e8
Merge pull request #817 from cecini/formatcheck
Update mypy and black format check to python version 3.8
2020-11-11 21:36:32 +10:00