Fix retain labels.
This is a numeric value based on the character offset of -k from the beginning of the switches.
This commit is contained in:
@@ -18,6 +18,7 @@ use crate::types::AstNode;
|
||||
use crate::types::BabelCall;
|
||||
use crate::types::Bold;
|
||||
use crate::types::CenterBlock;
|
||||
use crate::types::CharOffsetInLine;
|
||||
use crate::types::CheckboxType;
|
||||
use crate::types::Citation;
|
||||
use crate::types::CitationReference;
|
||||
@@ -1543,7 +1544,7 @@ fn compare_example_block<'b, 's>(
|
||||
_source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
rust: &'b ExampleBlock<'s>,
|
||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error + 's>> {
|
||||
let mut this_status = DiffStatus::Good;
|
||||
let mut message = None;
|
||||
|
||||
@@ -1624,7 +1625,7 @@ fn compare_example_block<'b, 's>(
|
||||
}
|
||||
|
||||
// Compare retain-labels
|
||||
let retain_labels = get_property_boolean(emacs, ":retain-labels")?;
|
||||
let retain_labels: Option<CharOffsetInLine> = get_property_numeric(emacs, ":retain-labels")?;
|
||||
if retain_labels != rust.retain_labels {
|
||||
this_status = DiffStatus::Bad;
|
||||
message = Some(format!(
|
||||
|
||||
Reference in New Issue
Block a user