Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: SASS content incorrectly highlighted as CSS syntax when lang='sass' is not on the same line with <style #987

Open
HPCesia opened this issue Jan 17, 2025 · 0 comments
Labels
- P2: nice to have Not breaking anything but nice to have (priority) feat: syntax Issue in our syntax highlighting (scope)

Comments

@HPCesia
Copy link

HPCesia commented Jan 17, 2025

Describe the Bug

When the lang attribute of the <style> tag is not on the same line as the style tag, the content may be incorrectly highlighted as CSS syntax.

Steps to Reproduce

  1. npm create astro@latest
  2. open the project in vscode
  3. install newest astro extension
  4. create anyname.astro with the contents
<style
  lang="sass"
  define:vars={{
    // any comment to avoid formatter collapse content into a single line
    foo: '#fff',
  }}
>
  .bar
    color: var(--foo)
</style>
  1. the content below .bar (include </style>) will be incorrectly highlighted as css syntax, not sass.

Link to Minimal Reproducible Example

https://gist.github.com/HPCesia/6e935433cfd6e414099f71714cb4961d

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jan 17, 2025
@Princesseuh Princesseuh added feat: syntax Issue in our syntax highlighting (scope) - P2: nice to have Not breaking anything but nice to have (priority) and removed needs triage Issue needs to be triaged labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) feat: syntax Issue in our syntax highlighting (scope)
Projects
None yet
Development

No branches or pull requests

2 participants