Added virtual newline handling and example
This commit is contained in:
parent
da32711e1a
commit
96bbaf1fdf
5 changed files with 129 additions and 3 deletions
38
src/snapshots/similar__text__virtual_newlines.snap
Normal file
38
src/snapshots/similar__text__virtual_newlines.snap
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
source: src/text.rs
|
||||
expression: "&changes"
|
||||
---
|
||||
[
|
||||
Change {
|
||||
tag: Equal,
|
||||
old_index: Some(
|
||||
0,
|
||||
),
|
||||
new_index: Some(
|
||||
0,
|
||||
),
|
||||
value: "a\n",
|
||||
},
|
||||
Change {
|
||||
tag: Delete,
|
||||
old_index: Some(
|
||||
1,
|
||||
),
|
||||
new_index: None,
|
||||
value: "b",
|
||||
},
|
||||
Change {
|
||||
tag: Equal,
|
||||
old_index: None,
|
||||
new_index: None,
|
||||
value: "\n",
|
||||
},
|
||||
Change {
|
||||
tag: Insert,
|
||||
old_index: None,
|
||||
new_index: Some(
|
||||
1,
|
||||
),
|
||||
value: "c\n",
|
||||
},
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue