AdguardTeam / AdguardTeam/VscodeAdblockSyntax

Add `meta.*` category scopes (`comment`, `cosmetic`, `network`) and exception flag to Adblock TextMate grammar

Offen
#158 0 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @totadavid95 Auf GitHub ansehen
Priority: P4 Status: Code Review
Vorherrschende Sprache
TypeScript
Sterne
88
Forks
8
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Introduce three category wrapper scopes and one orthogonal exception flag into `adblock.yaml-tmlanguage` using `begin`/`end` blocks around existing patterns (preserving all leaf scopes), then update and extend the grammar test suite with category-aware assertions across all rule families.

**Key changes**:
- Replace top-level `patterns` with `commentRules`, `cosmeticRules`, `networkRules` wrappers carrying `meta..adblock`
- Add `meta.exception.adblock` for allowlist rules (`@@` network, `#@#`/`$@$` cosmetic variants)
- Add scope constants (`META_COMMENT_SCOPE`, `META_COSMETIC_SCOPE`, `META_NETWORK_SCOPE`, `META_EXCEPTION_SCOPE`)
- Update all existing test scope arrays with category scopes
- Add new `category-scopes.test.ts` cross-cutting suite covering every rule family + exception flag

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.