use crate::error::CustomError; use super::registry::Registry; #[derive(Debug)] pub(crate) struct ISrcBlock { pub(crate) lines: Vec, } impl ISrcBlock { pub(crate) async fn new<'intermediate, 'parse>( registry: &mut Registry<'intermediate, 'parse>, original: &organic::types::SrcBlock<'parse>, ) -> Result { let lines = original .contents .split_inclusive('\n') .map(|s| s.to_owned()) .collect(); Ok(ISrcBlock { lines }) } }