Skip to content

Commit 792e6ba

Browse files
committed
feat(template-compiler): include sfc tag locations
1 parent 0a13252 commit 792e6ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

platform/nativescript/compiler/sfc/parser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export function parseComponent(
4646
currentBlock = {
4747
type: tag,
4848
content: '',
49+
tags: {
50+
open: { start, end },
51+
close: null
52+
},
4953
start: end,
5054
attrs: attrs.reduce((cumulated, { name, value }) => {
5155
cumulated[name] = value || true
@@ -98,6 +102,7 @@ export function parseComponent(
98102
if (currentBlock.type !== 'template' && options.pad) {
99103
text = padContent(currentBlock, options.pad) + text
100104
}
105+
currentBlock.tags.close = { start, end }
101106
currentBlock.content = text
102107
currentBlock = null
103108
}

0 commit comments

Comments
 (0)