Initial code structure for regular links.
This commit is contained in:
parent
f1bd7f2d1b
commit
3600f46e3b
@ -1071,13 +1071,23 @@ fn compare_strike_through<'s>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn compare_regular_link<'s>(
|
fn compare_regular_link<'s>(
|
||||||
_source: &'s str,
|
source: &'s str,
|
||||||
_emacs: &'s Token<'s>,
|
emacs: &'s Token<'s>,
|
||||||
_rust: &'s RegularLink<'s>,
|
rust: &'s RegularLink<'s>,
|
||||||
) -> Result<DiffResult, Box<dyn std::error::Error>> {
|
) -> Result<DiffResult, Box<dyn std::error::Error>> {
|
||||||
|
let mut this_status = DiffStatus::Good;
|
||||||
|
let emacs_name = "link";
|
||||||
|
if assert_name(emacs, emacs_name).is_err() {
|
||||||
|
this_status = DiffStatus::Bad;
|
||||||
|
}
|
||||||
|
|
||||||
|
if assert_bounds(source, emacs, rust).is_err() {
|
||||||
|
this_status = DiffStatus::Bad;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(DiffResult {
|
Ok(DiffResult {
|
||||||
status: DiffStatus::Good,
|
status: this_status,
|
||||||
name: "regular-link".to_owned(),
|
name: emacs_name.to_owned(),
|
||||||
message: None,
|
message: None,
|
||||||
children: Vec::new(),
|
children: Vec::new(),
|
||||||
})
|
})
|
||||||
|
@ -111,3 +111,9 @@ impl<'s> Source<'s> for Verbatim<'s> {
|
|||||||
self.source
|
self.source
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'s> Source<'s> for RegularLink<'s> {
|
||||||
|
fn get_source(&'s self) -> &'s str {
|
||||||
|
self.source
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user