Highlight Code In Rust With syntect
-
[]
look at this and combine it: id: 2ujekgik
```cargo
= "5.2.0"
```
use ThemeSet;
use highlighted_html_for_string;
use SyntaxSet;
syntect
TODO: Show Results Output
This is the version from the docs for testing newline stuff I'm trying to figure out.
```cargo
= "5.2.0"
```
use HighlightLines;
use SyntaxSet;
use ;
use ;
syntect
TODO: Show Results Output
Notes
-
It took a while to figure out the [TODO: Code shorthand span ] part based off the docs.
-
I don't understand what's going on there either. Something to investigate.
-
TODO is to look at this for a possibly simpler way: https://docs.rs/syntect/latest/syntect/easy/struct.HighlightLines.html
~ fin ~