- LineType::ListItem => "<ul>",
- LineType::Quote => "<blockquote>",
- LineType::PreformattedText => "<pre>",
- _ => "",
+ LineType::ListItem => "<ul>".to_string(),
+ LineType::Quote => "<blockquote>".to_string(),
+ LineType::PreformattedText => {
+ if let Some(label) = &block_label {
+ return format!("<pre role=\"img\" aria-label=\"{}\">", label);
+ } else {
+ return "<pre>".to_string();
+ }
+ },
+ _ => "".to_string(),