Skip to content

Line Diff - Word Diff Interplay For Atomics In Lists #95

Open
@brodieG

Description

@brodieG

Works as expected normally:

> diffPrint(1:100, (1:100)[-45], context=1, format="raw")
< 1:100                                  > (1:100)[-45]                         
@@ 5,3 @@                                @@ 5,3 @@                              
   [33]  33  34  35  36  37  38  39  40    [33]  33  34  35  36  37  38  39  40 
<  [41]  41  42  43  44  45  46  47  48  > [41]  41  42  43  44  46  47  48  49 
   [49]  49  50  51  52  53  54  55  56    [49]  50  51  52  53  54  55  56  57 

But obviously does not get unfurled within lists:

> diffPrint(list(1:100), list((1:100)[-45]), context=1, format="raw")
< list(1:100)                            > list((1:100)[-45])                   
@@ 6,10 @@                               @@ 6,10 @@                             
~ [[1]]                                  ~ [[1]]                                
   [33]  33  34  35  36  37  38  39  40    [33]  33  34  35  36  37  38  39  40 
<  [41]  41  42  43  44  45  46  47  48  > [41]  41  42  43  44  46  47  48  49 
<  [49]  49  50  51  52  53  54  55  56  > [49]  50  51  52  53  54  55  56  57 
<  [57]  57  58  59  60  61  62  63  64  > [57]  58  59  60  61  62  63  64  65 
<  [65]  65  66  67  68  69  70  71  72  > [65]  66  67  68  69  70  71  72  73 
<  [73]  73  74  75  76  77  78  79  80  > [73]  74  75  76  77  78  79  80  81 
<  [81]  81  82  83  84  85  86  87  88  > [81]  82  83  84  85  86  87  88  89 
<  [89]  89  90  91  92  93  94  95  96  > [89]  90  91  92  93  94  95  96  97 
<  [97]  97  98  99 100                  > [97]  98  99 100                     

This will obviously be very challenging to implement properly since we have to do a line diff to see if we can match objects within guidelines, and then do the unwrapped diff (and currently the way things are done is in the opposite order). We may also need to track the implicit objects involved throughout.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions