AdguardTeam / AdguardTeam/VscodeAdblockSyntax

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

Đang mở
#158 0 bình luận 0 reaction 1 người được giao Được giao cho @totadavid95 Xem trên GitHub
Priority: P4 Status: Code Review
Ngôn ngữ chính
TypeScript
Star
88
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.