Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rustc_lexer for rustdoc syntax highlighting #75775

Merged
merged 2 commits into from
Aug 30, 2020

Commits on Aug 27, 2020

  1. Remove dependency on StringReader from rustdoc highlighter

    rustc_lexer is the lossless lexer, which is a better fit for
    approximate syntax highlighting.
    
    As a side-effect, we can now syntax-highlight even broken code.
    matklad committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    1f95a91 View commit details
    Browse the repository at this point in the history
  2. Add expect test for rustdoc html highlighting

    It's a unit-test in a sense that it only checks syntax highlighting.
    However, the resulting HTML is written to disk and can be easily
    inspected in the browser.
    
    To update the test, run with `--bless` argument or set
    `UPDATE_EXPEC=1` env var
    matklad committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    b4f4db9 View commit details
    Browse the repository at this point in the history