mdBook/tests/dummy_book/src
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
..
first Test that long words are omitted from the search index. 2022-06-26 12:22:52 +01:00
second Fix even more print page links. (#963) 2019-07-01 17:52:25 +02:00
README.md Add readme to cause test to fail 2018-07-25 12:14:27 -05:00
SUMMARY.md search: fix anchor ids for duplicate headers 2022-02-18 16:20:05 +00:00
conclusion.md Search with Elasticlunr, updated (#604) 2018-03-07 21:02:06 +08:00
example.rs Scope splitting syntect "boring" implementation 2022-08-15 14:03:09 -07:00
intro.md Regression tests (#422) 2017-11-16 15:51:12 +08:00
second.md Rename playpen to playground. (#1241) 2020-06-22 16:34:25 +02:00

README.md

Dummy Book

This file is just here to cause the index preprocessor to run.

Does a pretty good job, too.