add highlighting to tutorial inline snippets

This commit is contained in:
Luke Boswell 2023-03-10 13:07:50 +11:00
parent a8cf9616da
commit b1e73dc8ef
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
4 changed files with 60 additions and 47 deletions

View file

@ -44,6 +44,7 @@ pub fn highlight(code: &str) -> Vec<String> {
| Token::Backpass
| Token::ColonEquals
| Token::Colon
| Token::And
| Token::QuestionMark => {
buf = push_html_span(buf, current_text, "kw");
}
@ -63,7 +64,6 @@ pub fn highlight(code: &str) -> Vec<String> {
| Token::DoubleEquals
| Token::DoubleBar
| Token::Plus
| Token::And
| Token::DoubleAnd => {
buf = push_html_span(buf, current_text, "op");
}