No description
Find a file
Eric Huss 426e7bee17 Fix loading of mode-rust.js
The reason the ACE editor was failing to load the rust syntax
highlighting is because the syntax highlighting was being created
*after* the editor was created. If the editor is created first, then ACE
tries to load `ace/mode/rust`. Since it isn't already defined, it tried
to compute the URL and load it manually. However, since the URLs now
have a hash in it (via https://github.com/rust-lang/mdBook/pull/1368),
it was unable to load.

The solution here is to make sure `ace/mode/rust` is defined before
creating the editors. Then ACE knows that it can just load the module
directly instead of trying to fetch it from the server.

Fixes https://github.com/rust-lang/mdBook/issues/2700
2025-05-23 07:19:27 -07:00
.github Update dependencies 2025-05-05 13:44:40 -07:00
ci Test more targets. 2024-05-16 17:27:28 -07:00
examples Fix clippy lint for 1.88 2025-05-14 18:18:45 -07:00
guide Document the edition2024 code block attribute 2025-05-19 12:51:11 +09:00
src Fix loading of mode-rust.js 2025-05-23 07:19:27 -07:00
test_book Fix, and test, the no-js toc sidebar with hashed resources 2025-02-20 10:27:18 -07:00
tests Fix loading of mode-rust.js 2025-05-23 07:19:27 -07:00
.eslintrc.json Fix eslint errors 2025-03-31 11:50:13 -07:00
.gitattributes Mark more font files as binary 2025-04-05 20:41:36 -04:00
.gitignore Add testsuite book directories to ignore list 2025-04-22 21:11:54 -07:00
Cargo.lock Update opener to 0.8.1 2025-05-21 18:33:43 +02:00
Cargo.toml Update opener to 0.8.1 2025-05-21 18:33:43 +02:00
CHANGELOG.md Update to 0.4.49 2025-05-05 14:44:37 -07:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Add information on eslint and how to install and run it 2025-03-23 10:06:12 +01:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
package.json Move JS files into front-end/js 2025-03-31 21:18:22 +02:00
README.md README.md: update workflow status badge 2025-02-13 11:01:08 -05:00
release.toml Metadata for cargo-release should be in release.toml (#722) 2018-07-09 18:36:55 +08:00
triagebot.toml Add more triagebot features 2025-03-23 13:04:10 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.