Commit Graph

4 Commits

Author SHA1 Message Date
Aleksey Kladov
1f95a91c24 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.
2020-08-27 17:43:15 +02:00
Oliver Middleton
79061d0e02 rustdoc: Catch fatal errors when syntax highlighting
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-17 23:44:44 +00:00
Oliver Middleton
baf2921ebc rustdoc: HTML escape codeblocks which fail syntax highlighting 2020-01-15 22:42:04 +00:00
Andy Russell
8c93798e9f rustdoc: check code block syntax in early pass 2019-01-14 21:21:21 -05:00