-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
🐛 BUG: SASS content incorrectly highlighted as CSS syntax when lang='sass' is not on the same line with <style #14657
Copy link
Copy link
Open
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: syntaxIssue in our syntax highlighting (scope)Issue in our syntax highlighting (scope)good first issueGood for newcomers. If you need additional guidance, feel free to post in #contribute on DiscordGood for newcomers. If you need additional guidance, feel free to post in #contribute on Discordpkg: language-toolsRelated to language-tooling (scope)Related to language-tooling (scope)
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: syntaxIssue in our syntax highlighting (scope)Issue in our syntax highlighting (scope)good first issueGood for newcomers. If you need additional guidance, feel free to post in #contribute on DiscordGood for newcomers. If you need additional guidance, feel free to post in #contribute on Discordpkg: language-toolsRelated to language-tooling (scope)Related to language-tooling (scope)