Compare plain list item bullets.

This commit is contained in:
Tom Alexander
2023-09-29 17:28:50 -04:00
parent 13697df7ea
commit 967e74c147
4 changed files with 53 additions and 17 deletions

View File

@@ -9,6 +9,7 @@ use super::sexp::unquote;
use super::sexp::Token;
use super::util::compare_standard_properties;
use super::util::get_property;
use super::util::get_property_quoted_string;
use super::util::get_property_unquoted_atom;
use crate::types::AngleLink;
use crate::types::BabelCall;
@@ -830,7 +831,16 @@ fn compare_plain_list_item<'s>(
.collect::<Result<Vec<_>, _>>()?;
child_status.push(artificial_diff_scope("contents", contents_status)?);
// TODO: Compare :bullet :counter :pre-blank
// TODO: Compare :counter :pre-blank
let bullet = get_property_quoted_string(emacs, ":bullet")?
.ok_or("Plain list items must have a :bullet.")?;
if bullet != rust.bullet {
this_status = DiffStatus::Bad;
message = Some(format!(
"Plain list item bullet mismatch (emacs != rust) {:?} != {:?}",
bullet, rust.bullet
));
}
// Compare checkbox
let checkbox = get_property(emacs, ":checkbox")?