Apply the link templates.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::borrow::Cow;
|
||||
use std::ops::RangeBounds;
|
||||
|
||||
use nom::Compare;
|
||||
@@ -184,6 +185,18 @@ impl<'s> From<OrgSource<'s>> for &'s str {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s> From<&OrgSource<'s>> for Cow<'s, str> {
|
||||
fn from(value: &OrgSource<'s>) -> Self {
|
||||
(&value.full_source[value.start..value.end]).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s> From<OrgSource<'s>> for Cow<'s, str> {
|
||||
fn from(value: OrgSource<'s>) -> Self {
|
||||
(&value.full_source[value.start..value.end]).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s, R> Slice<R> for OrgSource<'s>
|
||||
where
|
||||
R: RangeBounds<usize>,
|
||||
|
||||
Reference in New Issue
Block a user