Use the raw timestamp source for rendering timestamps.
Some checks failed
format Build format has succeeded
clippy Build clippy has failed
rust-test Build rust-test has succeeded
build Build build has succeeded

This commit is contained in:
Tom Alexander
2025-02-22 12:23:35 -05:00
parent 073ac0ac25
commit c371b999d5
3 changed files with 29 additions and 5 deletions

View File

@@ -1,5 +1,24 @@
use super::macros::inoop;
use super::macros::intermediate;
use super::util::coalesce_whitespace;
use crate::error::CustomError;
use organic::types::StandardProperties;
inoop!(ITimestamp, Timestamp);
#[derive(Debug, Clone)]
pub(crate) struct ITimestamp {
pub(crate) source: String,
pub(crate) post_blank: organic::types::PostBlank,
}
intermediate!(
ITimestamp,
&'orig organic::types::Timestamp<'parse>,
original,
_intermediate_context,
{
Ok(ITimestamp {
source: coalesce_whitespace(original.source).into_owned(),
post_blank: original.get_post_blank(),
})
}
);