Standardize the construction of intermediate BlogPostPage.
This commit is contained in:
@@ -7,11 +7,17 @@ pub(crate) struct ISrcBlock {
|
||||
pub(crate) lines: Vec<String>,
|
||||
}
|
||||
|
||||
intermediate!(ISrcBlock, SrcBlock, original, _registry, {
|
||||
let lines = original
|
||||
.get_value()
|
||||
.split_inclusive('\n')
|
||||
.map(|s| s.to_owned())
|
||||
.collect();
|
||||
Ok(ISrcBlock { lines })
|
||||
});
|
||||
intermediate!(
|
||||
ISrcBlock,
|
||||
&'orig organic::types::SrcBlock<'parse>,
|
||||
original,
|
||||
_registry,
|
||||
{
|
||||
let lines = original
|
||||
.get_value()
|
||||
.split_inclusive('\n')
|
||||
.map(|s| s.to_owned())
|
||||
.collect();
|
||||
Ok(ISrcBlock { lines })
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user