From e79f7676044659eeda331e0ed5abe381fbd44ea0 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Wed, 10 May 2023 23:34:45 +0200 Subject: [PATCH] lib: code block lang -> language --- src/html.rs | 4 ++-- src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/html.rs b/src/html.rs index b3c6985..5b5aaf9 100644 --- a/src/html.rs +++ b/src/html.rs @@ -266,8 +266,8 @@ impl<'s> Writer<'s> { }; write!(out, r#" style="text-align: {};">"#, a)?; } - Container::CodeBlock { lang } => { - if let Some(l) = lang { + Container::CodeBlock { language } => { + if let Some(l) = language { out.write_str(r#">"#)?; diff --git a/src/lib.rs b/src/lib.rs index 04da70c..f3795c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -290,7 +290,7 @@ pub enum Container<'s> { /// A block with raw markup for a specific output format. RawBlock { format: &'s str }, /// A block with code in a specific language. - CodeBlock { lang: Option<&'s str> }, + CodeBlock { language: Option<&'s str> }, /// An inline divider element. Span, /// An inline link, the first field is either a destination URL or an unresolved tag. @@ -903,7 +903,7 @@ impl<'s> Parser<'s> { Container::RawBlock { format } } else { Container::CodeBlock { - lang: (!content.is_empty()).then(|| content), + language: (!content.is_empty()).then(|| content), } } }