Skip to content

Compiler parse does not generate correct loc if end tag has whitepaces after the name #10694

Closed
@pikax

Description

@pikax

Vue version

3.4.21

Link to minimal reproduction

https://template-explorer.vuejs.org/#eyJzcmMiOiI8c3Bhbj5zb21lIHRleHQ8L3NwYW5cblxuXG4+Iiwib3B0aW9ucyI6eyJob2lzdFN0YXRpYyI6dHJ1ZSwiaW5saW5lIjp0cnVlLCJvcHRpbWl6ZUltcG9ydHMiOmZhbHNlfX0=

Steps to reproduce

Open the console and check AST

children[0].loc.source is <span>some text</span\n

What is expected?

to be

<span>some text</span


>

What is actually happening?

is ignoring past the whitespance

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.has PRA pull request has already been submitted to solve the issuescope: compiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions