|
36 | 36 | each:block = change.blocks ?><?cs
|
37 | 37 | if:block.type == 'unmod' ?><tbody class="unmod"><?cs
|
38 | 38 | each:line = block.base.lines ?><tr>
|
39 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
| 39 | + <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th> |
40 | 40 | <td class="base"><span><?cs var:line ?></span></td>
|
41 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
| 41 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th> |
42 | 42 | <td class="chg"><span><?cs var:line ?></span></td>
|
43 | 43 | </tr><?cs /each ?>
|
44 | 44 | </tbody><?cs
|
45 | 45 | elif:block.type == 'mod' ?><tbody class="mod"><?cs
|
46 | 46 | if:len(block.base.lines) >= len(block.changed.lines) ?><?cs
|
47 | 47 | each:line = block.base.lines ?><tr>
|
48 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
49 |
| - <td class="base"><del><?cs var:line ?></del></td><?cs |
50 |
| - if:len(block.changed.lines) >= name(line) ?><?cs |
| 48 | + <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th> |
| 49 | + <td class="base"><?cs var:line ?></td><?cs |
| 50 | + if:len(block.changed.lines) >= name(line) + 1 ?><?cs |
51 | 51 | each:changedline = block.changed.lines ?><?cs
|
52 | 52 | if:name(changedline) == name(line) ?>
|
53 |
| - <th class="chg"><?cs var:#block.changed.offset + name(changedline) ?></th> |
54 |
| - <td class="chg"><ins><?cs var:changedline ?></ins></td><?cs |
| 53 | + <th class="chg"><?cs var:#block.changed.offset + name(changedline) + 1 ?></th> |
| 54 | + <td class="chg"><?cs var:changedline ?></td><?cs |
55 | 55 | /if ?><?cs
|
56 | 56 | /each ?><?cs
|
57 | 57 | else ?>
|
|
61 | 61 | </tr><?cs /each ?><?cs
|
62 | 62 | else ?><?cs
|
63 | 63 | each:line = block.changed.lines ?><tr><?cs
|
64 |
| - if:len(block.base.lines) >= name(line) ?><?cs |
| 64 | + if:len(block.base.lines) >= name(line) + 1 ?><?cs |
65 | 65 | each:baseline = block.base.lines ?><?cs
|
66 | 66 | if:name(baseline) == name(line) ?>
|
67 |
| - <th class="base"><?cs var:#block.base.offset + name(baseline) ?></th> |
68 |
| - <td class="base"><del><?cs var:baseline ?></del></td><?cs |
| 67 | + <th class="base"><?cs var:#block.base.offset + name(baseline) + 1 ?></th> |
| 68 | + <td class="base"><?cs var:baseline ?></td><?cs |
69 | 69 | /if ?><?cs
|
70 | 70 | /each ?><?cs
|
71 | 71 | else ?>
|
72 | 72 | <th class="base"> </th>
|
73 | 73 | <td class="base"> </td><?cs
|
74 | 74 | /if ?>
|
75 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
76 |
| - <td class="chg"><ins><?cs var:line ?></ins></td> |
| 75 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th> |
| 76 | + <td class="chg"><?cs var:line ?></td> |
77 | 77 | </tr><?cs /each ?><?cs
|
78 | 78 | /if ?>
|
79 | 79 | </tbody><?cs
|
80 | 80 | elif:block.type == 'add' ?><tbody class="add"><?cs
|
81 | 81 | each:line = block.changed.lines ?><tr>
|
82 | 82 | <th class="base"> </th>
|
83 | 83 | <td class="base"> </td>
|
84 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
| 84 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + 1 ?></th> |
85 | 85 | <td class="chg"><ins><?cs var:line ?></ins></td>
|
86 | 86 | </tr><?cs /each ?><?cs
|
87 | 87 | elif:block.type == 'rem' ?><tbody class="rem"><?cs
|
88 | 88 | each:line = block.base.lines ?><tr>
|
89 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
| 89 | + <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th> |
90 | 90 | <td class="base"><del><?cs var:line ?></del></td>
|
91 | 91 | <th class="chg"> </th>
|
92 | 92 | <td class="chg"> </td>
|
|
98 | 98 | each:block = change.blocks ?>
|
99 | 99 | <?cs if:block.type == 'unmod' ?><tbody class="unmod"><?cs
|
100 | 100 | each:line = block.base.lines ?><tr>
|
101 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
102 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
| 101 | + <th class="base"><?cs var:#block.base.offset + name(line) + #1 ?></th> |
| 102 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th> |
103 | 103 | <td class="base"><span><?cs var:line ?></span></td>
|
104 | 104 | </tr><?cs /each ?>
|
105 | 105 | </tbody>
|
106 | 106 | <?cs elif:block.type == 'mod' ?><tbody class="mod"><?cs
|
107 | 107 | each:line = block.base.lines ?><tr class="<?cs
|
108 |
| - if:name(line) == 1 ?> first<?cs /if ?>"> |
109 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
| 108 | + if:name(line) == 0 ?>first<?cs /if ?>"> |
| 109 | + <th class="base"><?cs var:#block.base.offset + name(line) + #1 ?></th> |
110 | 110 | <th class="chg"> </th>
|
111 |
| - <td class="base"><del><?cs var:line ?></del></td> |
| 111 | + <td class="base"><?cs var:line ?></td> |
112 | 112 | </tr><?cs /each ?><?cs
|
113 | 113 | each:line = block.changed.lines ?><tr class="<?cs
|
114 |
| - if:name(line) == len(block.changed.lines) ?> last<?cs /if ?>"> |
| 114 | + if:name(line) + 1 == len(block.changed.lines) ?> last<?cs /if ?>"> |
115 | 115 | <th class="base"> </th>
|
116 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
117 |
| - <td class="chg"><ins><?cs var:line ?></ins></td> |
| 116 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th> |
| 117 | + <td class="chg"><?cs var:line ?></td> |
118 | 118 | </tr><?cs /each ?>
|
119 | 119 | </tbody>
|
120 | 120 | <?cs elif:block.type == 'add' ?><tbody class="add"><?cs
|
121 | 121 | each:line = block.changed.lines ?><tr class="<?cs
|
122 |
| - if:name(line) == 1 ?> first<?cs /if ?><?cs |
123 |
| - if:name(line) == len(block.changed.lines) ?> last ?><?cs /if ?>"> |
| 122 | + if:name(line) == 0 ?>first<?cs /if ?><?cs |
| 123 | + if:name(line) + 1 == len(block.changed.lines) ?> last ?><?cs /if ?>"> |
124 | 124 | <th class="base"> </th>
|
125 |
| - <th class="chg"><?cs var:#block.changed.offset + name(line) ?></th> |
| 125 | + <th class="chg"><?cs var:#block.changed.offset + name(line) + #1 ?></th> |
126 | 126 | <td class="chg"><ins><?cs var:line ?></ins></td>
|
127 | 127 | </tr><?cs /each ?>
|
128 | 128 | </tbody>
|
129 | 129 | <?cs elif:block.type == 'rem' ?><tbody class="rem"><?cs
|
130 | 130 | each:line = block.base.lines ?><tr class="<?cs
|
131 |
| - if:name(line) == 1 ?> first<?cs /if ?><?cs |
132 |
| - if:name(line) == len(block.base.lines) ?> last ?><?cs /if ?>"> |
133 |
| - <th class="base"><?cs var:#block.base.offset + name(line) ?></th> |
| 131 | + if:name(line) == 0 ?>first<?cs /if ?><?cs |
| 132 | + if:name(line) + 1 == len(block.base.lines) ?> last ?><?cs /if ?>"> |
| 133 | + <th class="base"><?cs var:#block.base.offset + name(line) + 1 ?></th> |
134 | 134 | <th class="chg"> </th>
|
135 | 135 | <td class="base"><del><?cs var:line ?></del></td>
|
136 | 136 | </tr><?cs /each ?>
|
|
0 commit comments