Switches are not stored for comment blocks, but they are allowed to appear.

This commit is contained in:
Tom Alexander
2023-10-04 09:51:28 -04:00
parent 2eaef82fdb
commit 4cdf88a632
5 changed files with 24 additions and 10 deletions

View File

@@ -1542,10 +1542,20 @@ fn compare_example_block<'b, 's>(
emacs: &'b Token<'s>,
rust: &'b ExampleBlock<'s>,
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
let this_status = DiffStatus::Good;
let message = None;
let mut this_status = DiffStatus::Good;
let mut message = None;
// TODO: Compare :value :switches :number-lines :preserve-indent :retain-labels :use-labels :label-fmt
// TODO: Compare :switches :number-lines :preserve-indent :retain-labels :use-labels :label-fmt
// Compare value
let contents = get_property_quoted_string(emacs, ":value")?.unwrap_or(String::new());
if contents != rust.contents {
this_status = DiffStatus::Bad;
message = Some(format!(
"Value mismatch (emacs != rust) {:?} != {:?}",
contents, rust.contents
));
}
Ok(DiffResult {
status: this_status,