Compare plain list item pre blank.
This commit is contained in:
@@ -53,6 +53,7 @@ use crate::types::PlainLink;
|
||||
use crate::types::PlainList;
|
||||
use crate::types::PlainListItem;
|
||||
use crate::types::PlainListItemCounter;
|
||||
use crate::types::PlainListItemPreBlank;
|
||||
use crate::types::PlainListType;
|
||||
use crate::types::PlainText;
|
||||
use crate::types::Planning;
|
||||
@@ -887,7 +888,19 @@ fn compare_plain_list_item<'s>(
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: Compare :pre-blank
|
||||
// Compare pre-blank
|
||||
// :pre-blank appears to count the line breaks between "::" and the contents in a descriptive list. Oddly enough it does not count the spaces so I'm not quite sure what the value is.
|
||||
let pre_blank = get_property_unquoted_atom(emacs, ":pre-blank")?;
|
||||
let pre_blank: Option<PlainListItemPreBlank> = pre_blank
|
||||
.map(|val| val.parse())
|
||||
.map_or(Ok(None), |r| r.map(Some))?;
|
||||
if pre_blank.unwrap_or(0) != rust.pre_blank {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
"Pre-blank mismatch (emacs != rust) {:?} != {:?}",
|
||||
pre_blank, rust.pre_blank
|
||||
));
|
||||
}
|
||||
|
||||
Ok(DiffResult {
|
||||
status: this_status,
|
||||
|
||||
Reference in New Issue
Block a user