Skip to content

Conversation

@Rohit1415
Copy link

Changes

  • Fixes incorrect syntax highlighting when the lang="sass" attribute is placed on a new line within a <style> tag.
  • Updates the tags-lang grammar lookahead patterns in astro.tmLanguage.src.yaml to support multi-line attribute parsing using [\s\S]*?.
  • Regenerates the corresponding astro.tmLanguage.json to ensure consistent highlighting behavior.
  • Ensures SASS blocks render correctly in the VS Code extension regardless of <style> formatting.

Before

SASS content inside a multi-line <style> tag was highlighted as CSS instead of SASS:

<style
  lang="sass"
>
  .bar
    color: var(--foo)
</style>

After

The same SASS block is now parsed and highlighted correctly as SASS, matching the behavior when lang="sass" is on a single line.

Testing

  • Updated the grammar and rebuilt the VS Code extension via pnpm -C packages/language-tools/vscode build.
  • Launched the Extension Development Host and manually verified syntax highlighting using the provided reproduction case.
  • Confirmed that SASS content and closing </style> tags are now highlighted consistently in both single-line and multi-line <style lang="sass"> formats.

Docs

No documentation updates required. This change affects syntax highlighting behavior only and does not introduce user-facing configuration or API changes.

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 8227b42

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant