From 63b8ad08bb8e08b792f3b25710992336d90f810c Mon Sep 17 00:00:00 2001 From: Harry Downing <74541141+harrydowning@users.noreply.github.com> Date: Tue, 15 Oct 2024 20:55:58 +0100 Subject: [PATCH] feat: Allow nested embedding [release] (#60) --- CHANGELOG.md | 9 ++++++++- package-lock.json | 4 ++-- package.json | 2 +- src/injection-grammar.ts | 2 +- ...rce.github-actions-workflow.injection.tmLanguage.json | 2 +- syntaxes/source.yaml.injection.tmLanguage.json | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c2a4d4..c4614f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +## [1.3.0] - 2024-10-15 + +### Changed + +- `injectionSelector` to allow nested embedded languages + ## [1.2.0] - 2024-09-15 ### Added @@ -163,7 +169,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Highlighting support for 40 languages in YAML block-scalars -[unreleased]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.2.0...HEAD +[unreleased]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.3.0...HEAD +[1.3.0]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.0.6...v1.1.0 [1.0.6]: https://github.com/harrydowning/vscode-yaml-embedded-languages/compare/v1.0.5...v1.0.6 diff --git a/package-lock.json b/package-lock.json index c1c0b56..7b30c95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yaml-embedded-languages", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yaml-embedded-languages", - "version": "1.2.0", + "version": "1.3.0", "license": "MIT", "devDependencies": { "@eslint/js": "^9.9.0", diff --git a/package.json b/package.json index 2a2e46e..3c83773 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yaml-embedded-languages", - "version": "1.2.0", + "version": "1.3.0", "displayName": "YAML Embedded Languages", "description": "Support for syntax highlighting within YAML block-scalars.", "icon": "images/icon.png", diff --git a/src/injection-grammar.ts b/src/injection-grammar.ts index 0bfdeac..a43e4e7 100644 --- a/src/injection-grammar.ts +++ b/src/injection-grammar.ts @@ -89,7 +89,7 @@ export class InjectionGrammar extends Writable { valueOf() { return { scopeName: this.scopeName, - injectionSelector: `L:${this.injectionScopeName} -comment -string -meta.embedded`, + injectionSelector: `L:${this.injectionScopeName} -comment -string`, patterns: this.#getPatterns(), }; } diff --git a/syntaxes/source.github-actions-workflow.injection.tmLanguage.json b/syntaxes/source.github-actions-workflow.injection.tmLanguage.json index 72875f5..0eb9515 100644 --- a/syntaxes/source.github-actions-workflow.injection.tmLanguage.json +++ b/syntaxes/source.github-actions-workflow.injection.tmLanguage.json @@ -1,6 +1,6 @@ { "scopeName": "source.github-actions-workflow.injection", - "injectionSelector": "L:source.github-actions-workflow -comment -string -meta.embedded", + "injectionSelector": "L:source.github-actions-workflow -comment -string", "patterns": [ { "begin": "#\\s*yaml-embedded-languages\\s*$", diff --git a/syntaxes/source.yaml.injection.tmLanguage.json b/syntaxes/source.yaml.injection.tmLanguage.json index b828912..984a8dd 100644 --- a/syntaxes/source.yaml.injection.tmLanguage.json +++ b/syntaxes/source.yaml.injection.tmLanguage.json @@ -1,6 +1,6 @@ { "scopeName": "source.yaml.injection", - "injectionSelector": "L:source.yaml -comment -string -meta.embedded", + "injectionSelector": "L:source.yaml -comment -string", "patterns": [ { "begin": "#\\s*yaml-embedded-languages\\s*$",