Skip to content

Commit

Permalink
fix(html): allow unexpected question mark in tag name (#18852)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christiano300 authored Dec 5, 2024
1 parent 7de7c5b commit 1b54e50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vite/src/node/plugins/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ function handleParseError(
case 'non-void-html-element-start-tag-with-trailing-solidus':
// Allow self closing on non-void elements #10439
return
case 'unexpected-question-mark-instead-of-tag-name':
// Allow <?xml> declaration and <?> empty elements
// lit generates <?>: https://github.com/lit/lit/issues/2470
return
}
const parseError = formatParseError(parserError, filePath, html)
throw new Error(
Expand Down

0 comments on commit 1b54e50

Please sign in to comment.