2023-10-29 21:29:16 +00:00
|
|
|
use super::macros::intermediate;
|
2023-10-27 18:43:06 +00:00
|
|
|
use super::registry::Registry;
|
2023-10-29 21:29:16 +00:00
|
|
|
use super::util::coalesce_whitespace;
|
|
|
|
use crate::error::CustomError;
|
2023-10-27 18:43:06 +00:00
|
|
|
|
2023-10-29 19:36:15 +00:00
|
|
|
#[derive(Debug, Clone)]
|
2023-10-27 17:05:34 +00:00
|
|
|
pub(crate) struct IPlainText {
|
2023-10-27 23:42:33 +00:00
|
|
|
pub(crate) source: String,
|
2023-10-27 14:23:05 +00:00
|
|
|
}
|
|
|
|
|
2023-10-29 21:29:16 +00:00
|
|
|
intermediate!(IPlainText, PlainText, |registry, original| async {
|
|
|
|
Ok(IPlainText {
|
|
|
|
source: coalesce_whitespace(original.source).into_owned(),
|
|
|
|
})
|
|
|
|
});
|