cargo fmt

This commit is contained in:
Luke Boswell 2023-03-06 22:37:56 +11:00
parent 5ead576976
commit 25b3b61e07
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
2 changed files with 5 additions and 6 deletions

View file

@ -859,7 +859,6 @@ fn markdown_to_html(
Some(&mut broken_link_callback), Some(&mut broken_link_callback),
) )
.fold((0, 0), |(start_quote_count, end_quote_count), event| { .fold((0, 0), |(start_quote_count, end_quote_count), event| {
match &event { match &event {
// Replace this sequence (`>>>` syntax): // Replace this sequence (`>>>` syntax):
// Start(BlockQuote) // Start(BlockQuote)
@ -932,9 +931,9 @@ fn markdown_to_html(
Event::End(CodeBlock(_)) => { Event::End(CodeBlock(_)) => {
if in_code_block { if in_code_block {
let highlighted_html = roc_highlight::highlight_roc_code(&to_highlight); let highlighted_html = roc_highlight::highlight_roc_code(&to_highlight);
docs_parser.push(pulldown_cmark::Event::Html( docs_parser.push(pulldown_cmark::Event::Html(pulldown_cmark::CowStr::from(
pulldown_cmark::CowStr::from(highlighted_html), highlighted_html,
)); )));
to_highlight = String::new(); to_highlight = String::new();
in_code_block = false; in_code_block = false;
} }

View file

@ -78,10 +78,10 @@ pub fn highlight_roc_code(code: &str) -> String {
} }
Token::UpperIdent => { Token::UpperIdent => {
buf = push_html_span(buf, current_text, "upperident"); buf = push_html_span(buf, current_text, "upperident");
} }
Token::LowerIdent => { Token::LowerIdent => {
buf = push_html_span(buf, current_text, "lowerident"); buf = push_html_span(buf, current_text, "lowerident");
} }
Token::Error | Token::Other => { Token::Error | Token::Other => {
buf = push_html(buf, current_text); buf = push_html(buf, current_text);
} }