Skip to content

🐛 Svelte: templates without expressions are parsed as HtmlBogusElement #10274

@solithcy

Description

@solithcy

Environment information

Details
rose@X870:~/code/biome-testing$ biome rage
CLI:
  Version:                      2.4.14
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v24.11.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Not set
  Path:                         unset

Workspace:
  Open Documents:               0

What happened?

#10140 fixed templates with missing expressions crashing, but introduced messy parsing.
https://biomejs.dev/playground/?indentScriptAndStyle=true&lintRules=all&tab=syntax&pane=Console&code=ewAjAGkAZgAgAHQAcgB1AGUAfQAKACAAIAAKAHsAOgBlAGwAcwBlACAAaQBmAH0ACgAgACAACgB7AC8AaQBmAH0A&language=svelte

Expected result

Templates should be parsed as templates with missing expressions, not as HtmlBogusElement or svelte elements without R_CURLY

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-ParserArea: parserL-HTMLLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions