This PR attempts to get a syntect implementation that actually works,
by manipulating the scope stack directly instead of trying to post-process
the HTML.
It takes strings like this:
let _t = "interesting string
\# boring string
";
And produces DOMs that look like this:
<span class="syn-source syn-rust">
<span class="syn-storage syn-type syn-rust">let</span>
_t
<span class="syn-keyword syn-operator syn-assignment syn-rust">=</span>
<span class="syn-string syn-quoted syn-double syn-rust">
<span class="syn-punctuation syn-definition syn-string syn-begin syn-rust">"</span>
interesting string
</span>
</span>
<span class="boring">
<span class="syn-source syn-rust">
<span class="syn-string syn-quoted syn-double syn-rust">boring string</span>
</span>
</span>
<span class="syn-source syn-rust">
<span class="syn-string syn-quoted syn-double syn-rust">
<span class="syn-punctuation syn-definition syn-string syn-end syn-rust">"</span>
</span>
<span class="syn-punctuation syn-terminator syn-rust">;</span>
</span>
In other words, it splits it up the same way a WYSIWYG editor might if you tried to apply a block
style to a deeply-nested selection; it maintains the styles, but always ensures "boring" is top-level.
It doesn't produce optimal HTML, but it should always work.
nixpkgs build system sets `RUST_LOG=` (empty value) by default.
This switches `mdBook` into warnings+ mode (instead of info+).
This causes the following tests to fail:
$ RUST_LOG= cargo test --test cli_tests
...
cli::test::mdbook_cli_can_correctly_test_a_passing_book
cli::test::mdbook_cli_detects_book_with_failing_tests
cli::build::mdbook_cli_dummy_book_generates_index_html
The change drops RUST_LOG= entry.
* Removed the itertools dependency
* Removed an unused feature flag
* Stubbed out a toml_query replacement
* Update dependencies.
* Bump env_logger.
* Use warp instead of iron for http server.
Iron does not appear to be maintained anymore. warp/hyper seems to be
reasonably maintained. Unfortunately this takes a few seconds more
to compile, but shouldn't be too bad.
One benefit is that there is no longer a need for a separate websocket
port, which makes it easier to run multiple servers at once.
* Update pulldown-cmark to 0.7
* Switch from error-chain to anyhow.
* Bump MSRV to 1.39.
* Update elasticlunr-rs.
Co-authored-by: Michael Bryan <michaelfbryan@gmail.com>
* Allow underscores in the link type name
* Add some tests for include anchors
* Include parts of Rust files and hide the rest
Fixes#618.
* Increase min supported Rust version to 1.35
* Add a test for a behavior of rustdoc_include I want to depend on
At first I thought this was a bug, but then I looked at some use cases
we have in TRPL and decided this was a feature that I'd like to use.