#highlight #rustdoc #syntax-highlighting #highlighting #syntax

nightly rustdoc-highlight

A Rust syntax highlighting library

10 releases

Uses old Rust 2015

0.1.10 Nov 16, 2019
0.1.9 Aug 18, 2019
0.1.7 Feb 1, 2019
0.1.6 Dec 19, 2018
0.1.1 Mar 26, 2018

#606 in Development tools

Download history 4/week @ 2020-12-29 19/week @ 2021-01-05 10/week @ 2021-01-12 16/week @ 2021-01-19 9/week @ 2021-01-26 26/week @ 2021-02-02 22/week @ 2021-02-09 36/week @ 2021-02-16 6/week @ 2021-02-23 11/week @ 2021-03-02 8/week @ 2021-03-09 5/week @ 2021-03-16 29/week @ 2021-03-23 32/week @ 2021-03-30 18/week @ 2021-04-06 22/week @ 2021-04-13

60 downloads per month
Used in cargo-src

Apache-2.0/MIT

20KB
347 lines

rustdoc-highlight

Rustdoc's syntax highlighting in its own crate for ease of use.

Usage

TODO


lib.rs:

Basic syntax highlighting functionality.

This module uses libsyntax's lexer to provide token-based highlighting for the HTML documentation generated by rustdoc.

If you just want to syntax highlighting for a Rust program, then you can use the render_inner_with_highlighting or render_with_highlighting functions. For more advanced use cases (if you want to supply your own css classes or control how the HTML is generated, or even generate something other then HTML), then you should implement the Writer trait and use a Classifier.

Dependencies

~83KB