Skip to content

Commit ab831f5

Browse files
committed
update offsets after trimming trailing newline
1 parent 0b03a84 commit ab831f5

File tree

1 file changed

+31
-31
lines changed
  • packages/svelte/tests/parser-legacy/samples/javascript-comments

1 file changed

+31
-31
lines changed

packages/svelte/tests/parser-legacy/samples/javascript-comments/output.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"html": {
33
"type": "Fragment",
44
"start": 133,
5-
"end": 342,
5+
"end": 341,
66
"children": [
77
{
88
"type": "Text",
@@ -14,7 +14,7 @@
1414
{
1515
"type": "Element",
1616
"start": 133,
17-
"end": 252,
17+
"end": 251,
1818
"name": "button",
1919
"attributes": [
2020
{
@@ -130,63 +130,63 @@
130130
{
131131
"type": "Text",
132132
"start": 209,
133-
"end": 211,
134-
"raw": "\n\t",
135-
"data": "\n\t"
133+
"end": 210,
134+
"raw": "\n",
135+
"data": "\n"
136136
},
137137
{
138138
"type": "MustacheTag",
139-
"start": 211,
140-
"end": 242,
139+
"start": 210,
140+
"end": 241,
141141
"expression": {
142142
"type": "Identifier",
143-
"start": 240,
144-
"end": 241,
143+
"start": 239,
144+
"end": 240,
145145
"loc": {
146146
"start": {
147147
"line": 19,
148-
"column": 30
148+
"column": 29
149149
},
150150
"end": {
151151
"line": 19,
152-
"column": 31
152+
"column": 30
153153
}
154154
},
155155
"name": "a",
156156
"leadingComments": [
157157
{
158158
"type": "Block",
159159
"value": " leading block comment ",
160-
"start": 212,
161-
"end": 239
160+
"start": 211,
161+
"end": 238
162162
}
163163
]
164164
}
165165
},
166166
{
167167
"type": "Text",
168-
"start": 242,
169-
"end": 243,
168+
"start": 241,
169+
"end": 242,
170170
"raw": "\n",
171171
"data": "\n"
172172
}
173173
]
174174
},
175175
{
176176
"type": "Text",
177-
"start": 252,
178-
"end": 253,
177+
"start": 251,
178+
"end": 252,
179179
"raw": "\n",
180180
"data": "\n"
181181
},
182182
{
183183
"type": "MustacheTag",
184-
"start": 253,
185-
"end": 342,
184+
"start": 252,
185+
"end": 341,
186186
"expression": {
187187
"type": "BinaryExpression",
188-
"start": 280,
189-
"end": 285,
188+
"start": 279,
189+
"end": 284,
190190
"loc": {
191191
"start": {
192192
"line": 22,
@@ -199,8 +199,8 @@
199199
},
200200
"left": {
201201
"type": "Identifier",
202-
"start": 280,
203-
"end": 281,
202+
"start": 279,
203+
"end": 280,
204204
"loc": {
205205
"start": {
206206
"line": 22,
@@ -216,8 +216,8 @@
216216
"operator": "+",
217217
"right": {
218218
"type": "Identifier",
219-
"start": 284,
220-
"end": 285,
219+
"start": 283,
220+
"end": 284,
221221
"loc": {
222222
"start": {
223223
"line": 22,
@@ -234,22 +234,22 @@
234234
{
235235
"type": "Line",
236236
"value": " leading line comment",
237-
"start": 255,
238-
"end": 278
237+
"start": 254,
238+
"end": 277
239239
}
240240
],
241241
"trailingComments": [
242242
{
243243
"type": "Line",
244244
"value": " trailing line comment",
245-
"start": 286,
246-
"end": 310
245+
"start": 285,
246+
"end": 309
247247
},
248248
{
249249
"type": "Block",
250250
"value": " trailing block comment ",
251-
"start": 312,
252-
"end": 340
251+
"start": 311,
252+
"end": 339
253253
}
254254
]
255255
}

0 commit comments

Comments
 (0)