mdBook/tests
Michael Howell 14250259ef Scope splitting syntect "boring" implementation
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">&quot;</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">&quot;</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.
2022-08-15 14:03:09 -07:00
..
cli tests/cli: ignore user's RUST_LOG= environment variable in tests 2022-04-01 08:15:18 +01:00
dummy_book Scope splitting syntect "boring" implementation 2022-08-15 14:03:09 -07:00
summary_md_files Rewrote summary parser from a state machine to use recursive descent 2017-12-11 15:17:20 +11:00
alternative_backends.rs Fix relative paths for renderer commands. 2020-12-30 17:46:29 -08:00
build_process.rs Transition to 2018 edition (#933) 2019-05-25 20:50:41 +02:00
cli_tests.rs Move cli tests to their own subdir 2021-09-26 11:29:36 -07:00
custom_preprocessors.rs Transition to 2018 edition (#933) 2019-05-25 20:50:41 +02:00
init.rs Use syntect instead of highlight.js 2022-08-15 14:03:09 -07:00
parse_existing_summary_files.rs Update dependencies. (#1211) 2020-05-20 23:32:00 +02:00
rendered_output.rs Scope splitting syntect "boring" implementation 2022-08-15 14:03:09 -07:00
searchindex_fixture.json Test that long words are omitted from the search index. 2022-06-26 12:22:52 +01:00
testing.rs When this test fails, print out why to assist in debugging 2019-08-12 09:50:54 -04:00