Skip to content

Commit 1aeb1d6

Browse files
committed
chore: clearer injection options separator
1 parent f9bbc4d commit 1aeb1d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/src/Overlay.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default {
121121
return ele === target ? true : this.isChildOf(ele.parentNode, target)
122122
},
123123
getTargetNode(e) {
124-
const splitRE = /(.+)_([\d]+)_([\d]+)$/
124+
const splitRE = /(.+):([\d]+):([\d]+)$/
125125
const path = e.path ?? e.composedPath()
126126
const targetNode = path?.find(node => node?.hasAttribute?.('data-v-inspector-options'))
127127
if (this.isChildOf(targetNode, this.$refs.containerRef) || !targetNode) {

packages/core/src/compiler/template.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function compileSFCTemplate(
3333
const insertPosition = node.loc.start.offset + node.tag.length + 1
3434
const { line, column } = node.loc.start
3535

36-
const content = ` data-v-inspector-options="${relativePath}_${line}_${column}"`
36+
const content = ` data-v-inspector-options="${relativePath}:${line}:${column}"`
3737

3838
s.prependLeft(
3939
insertPosition,
@@ -71,7 +71,7 @@ export async function compileSFCTemplate(
7171
const insertPosition = node.start + parseJSXIdentifier(node.openingElement.name as any).length + 1
7272
const { line, column } = node.loc.start
7373

74-
const content = ` data-v-inspector-options="${relativePath}_${line}_${column}"`
74+
const content = ` data-v-inspector-options="${relativePath}:${line}:${column}"`
7575

7676
s.prependLeft(
7777
insertPosition,

0 commit comments

Comments
 (0)