Add src block properties.

These are largely the same as example blocks but with a :language property.
This commit is contained in:
Tom Alexander
2023-10-04 16:58:45 -04:00
parent 13163f2468
commit b556f4617f
3 changed files with 223 additions and 18 deletions

View File

@@ -49,7 +49,6 @@ pub enum RetainLabels {
#[derive(Debug)]
pub struct ExampleBlock<'s> {
pub source: &'s str,
pub name: &'s str,
pub switches: Option<&'s str>,
pub number_lines: Option<SwitchNumberLines>,
pub retain_labels: RetainLabels,
@@ -69,9 +68,13 @@ pub struct ExportBlock<'s> {
#[derive(Debug)]
pub struct SrcBlock<'s> {
pub source: &'s str,
pub name: &'s str,
pub switches: Option<&'s str>,
pub contents: &'s str,
pub language: Option<&'s str>,
pub number_lines: Option<SwitchNumberLines>,
pub retain_labels: RetainLabels,
pub use_labels: bool,
pub label_format: Option<&'s str>,
pub contents: String,
}
#[derive(Debug)]