use crate::error::CustomError; use crate::intermediate::util::coalesce_whitespace; use super::registry::Registry; #[derive(Debug)] pub(crate) struct IPlainText { pub(crate) source: String, } impl IPlainText { pub(crate) async fn new<'intermediate, 'parse>( registry: &mut Registry<'intermediate, 'parse>, plain_text: &organic::types::PlainText<'parse>, ) -> Result { Ok(IPlainText { source: coalesce_whitespace(plain_text.source).into_owned(), }) } }