AdguardTeam / AdguardTeam/VscodeAdblockSyntax

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

Aperta
#158 0 commenti 0 reazioni 1 assegnatario Assegnata a @totadavid95 Vedi su GitHub
Priority: P4 Status: Code Review
Lingua principale
TypeScript
Stelle
88
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.