We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 764c2b3 commit f45818aCopy full SHA for f45818a
src/vueTransform.js
@@ -153,11 +153,15 @@ function parseTemplate (code) {
153
for (let i = fragment.childNodes.length - 1; i >= 0; i -= 1) {
154
const name = fragment.childNodes[i].nodeName
155
if (!(name in nodes)) {
156
- nodes[name] = []
+ continue
157
}
158
+
159
+ const start = fragment.childNodes[i].__location.startTag.endOffset
160
+ const end = fragment.childNodes[i].__location.endTag.startOffset
161
162
nodes[name].push({
163
node: fragment.childNodes[i],
- code: parse5.serialize(fragment.childNodes[i]),
164
+ code: code.substr(start, end - start),
165
attrs: getNodeAttrs(fragment.childNodes[i])
166
})
167
0 commit comments