This fixes an issue where global keypresses were being caught when they
shouldn't when there is a shadow DOM element with focus. This can happen
if the user has included their own extensions. Arguably the extension
should do a stopPropagation, but they don't always do that. I think this
is relatively safe way to approach this.
Fixes https://github.com/rust-lang/mdBook/issues/2507
This fixes an issue where pressing `?` inside the ACE editor was opening
the help popup. The solution here is to ensure that the global keypress
handler works the same as the one used in the search handler.
Fortunately other keypresses like left and right were working OK because
ACE was doing something like stopPropagation (I'm not sure exactly).
Fixes https://github.com/rust-lang/mdBook/issues/3064
This requires a switch to the configuration file format described at
https://eslint.org/docs/latest/use/configure/configuration-files. I used
the automatic tool to generate the new file, with some simplifications
around defaults.
- Removed no-cond-assign override, it is no longer needed.
- Fixed `catch (e)` where `e` is not used. This seems a little pedantic
to me, but seems like a relatively easy fix to just remove it, and I
believe the syntax without the variable has been supported for quite
some time. Alternatively it could also be `_e`, or explicitly allowed.
- Added `--no-warn-ignored` to the script since it was very noisy.
This changes all HTML IDs so that they have the `mdbook-` prefix. This
should help avoid ID conflicts between internal IDs and IDs from user
content such as section headers.
This is a relatively disruptive change and has a high risk of breaking
something. However, I think I have covered everything, and if anything
is missed, hopefully it will get detected.
I did not change class names since the chance of a collision is much
smaller than with IDs. However, that is something that could be
considered in the future.
Closes https://github.com/rust-lang/mdBook/issues/880
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-html.
Additional commits will refactor/move/remove items.