mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
cargo fmt
This commit is contained in:
parent
5ead576976
commit
25b3b61e07
2 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue