withastro/astro
Ver no GitHub🐛 BUG: SASS content incorrectly highlighted as CSS syntax when `lang='sass'` is not on the same line with `<style`
Open
#14.657 aberto em 17 de jan. de 2025
- P2: nice to havefeat: syntaxgood first issuepkg: language-toolstriage: needs triage
Métricas do repositório
- Stars
- (59.282 stars)
- Métricas de merge de PR
- (Mesclagem média 4d 23h) (197 fundiu PRs em 30d)
Description
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
npm create astro@latest- open the project in vscode
- install newest astro extension
- create
anyname.astrowith 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>
- 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