Get the real language for src blocks from the org source.
This commit is contained in:
@@ -5,6 +5,7 @@ use crate::error::CustomError;
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct ISrcBlock {
|
||||
pub(crate) lines: Vec<String>,
|
||||
pub(crate) language: Option<String>,
|
||||
}
|
||||
|
||||
intermediate!(
|
||||
@@ -18,6 +19,7 @@ intermediate!(
|
||||
.split_inclusive('\n')
|
||||
.map(|s| s.to_owned())
|
||||
.collect();
|
||||
Ok(ISrcBlock { lines })
|
||||
let language = original.language.map(str::to_owned);
|
||||
Ok(ISrcBlock { lines, language })
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user