- to minimize pop-in of images and mathjax, fade the previous card
out and fade the next card in
- render the answer at the same time as the question so it can be
shown immediately
- move reviewer css to separate file
- remove image preloading code that should no longer be necessary
- js code that was previously bundled in .py files is now in the
web folder
- add helpers to create links to bundled files, and update
stdHtml() to accept a list of javascript files to include
instead of text
- render MathJax in card layout and preview screens - these should be
updated in the future to update the document dynamically like the
reviewer does
- start media server earlier so it can be used to serve content for
the toolbar, etc
- work around a bug in WebEngine on Windows that could cause the
media server to hang
- add option to wrap html in implicit pre-wrap environment during
editing and review - defaults to off
- update paste filter to convert divs/Ps to newlines and non-breaking
spaces to normal ones
- catch enter key and write \n instead of creating a new div
also:
- remove extra caretToEnd() call that is no longer required
- add dd/dt/dl to allowed tags
It looks like pyqt5 is playing dirty and checking the number of args of
functions before calling them. When using hooks.wrap, pyqt5 thinks it
can pass any amount of arguments (because *args) and you get exceptions
like this inside the wrap function, when calling the 'old' function:
>TypeError: onFindDupes() takes 1 positional argument but 2 were given
This commit fixes it by preserving the signature of the wrapped method,
by adding an optional dependency on the "decorator" module.
Making it an optional dependency is probably not the wisest idea but
since this is a small edge case it might be smoother to start like this.
I also added functools.wraps() as a fallback, which won't help much but
is slightly more correct.
See this article for details: https://hynek.me/articles/decorators/
on windows webengine seems to install a permanent ctrl+z handler that is
active even when an editing area is not selected, so our shortcut is
never triggered when the webengineview is focused.