Skip to content

Commit 7f456c2

Browse files
committed
test: add failed case
1 parent d53daf1 commit 7f456c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/compiler-core/__tests__/parse.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,12 @@ describe('compiler: parse', () => {
22712271
expect(span.loc.start.offset).toBe(0)
22722272
expect(span.loc.end.offset).toBe(27)
22732273
})
2274+
2275+
test('correct loc when a line in attribute value ends with &', () => {
2276+
const [span] = baseParse(`<span v-if="foo &&\nbar"></span>`).children
2277+
2278+
expect(span.loc.end.line).toBe(2)
2279+
})
22742280
})
22752281

22762282
describe('decodeEntities option', () => {

0 commit comments

Comments
 (0)