Support list with empty string as only element for empty list.
This commit is contained in:
parent
cd6a64c015
commit
eb2995dd3b
@ -411,7 +411,7 @@ pub(crate) fn wasm_get_emacs_standard_properties(
|
|||||||
|
|
||||||
fn wasm_compare_list<'e, 's: 'e, 'w, EI, WI>(
|
fn wasm_compare_list<'e, 's: 'e, 'w, EI, WI>(
|
||||||
source: &'s str,
|
source: &'s str,
|
||||||
emacs: EI,
|
mut emacs: EI,
|
||||||
wasm: WI,
|
wasm: WI,
|
||||||
) -> Result<WasmDiffResult<'s>, Box<dyn std::error::Error>>
|
) -> Result<WasmDiffResult<'s>, Box<dyn std::error::Error>>
|
||||||
where
|
where
|
||||||
@ -420,6 +420,11 @@ where
|
|||||||
{
|
{
|
||||||
let emacs_length = emacs.len();
|
let emacs_length = emacs.len();
|
||||||
let wasm_length = wasm.len();
|
let wasm_length = wasm.len();
|
||||||
|
if emacs_length == 1 && wasm_length == 0 {
|
||||||
|
if emacs.all(|t| matches!(t.as_atom(), Ok(r#""""#))) {
|
||||||
|
return Ok(WasmDiffResult::default());
|
||||||
|
}
|
||||||
|
}
|
||||||
if emacs_length != wasm_length {
|
if emacs_length != wasm_length {
|
||||||
return Ok(WasmDiffResult {
|
return Ok(WasmDiffResult {
|
||||||
status: vec![WasmDiffStatus::Bad(
|
status: vec![WasmDiffStatus::Bad(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user