AdguardTeam / VscodeAdblockSyntax

Comprehensive extension to manage Adblock Syntax in VSCode: syntax highlighter, linter and much more. Available on the VSCode Marketplace.
https://marketplace.visualstudio.com/items?itemName=adguard.adblock
MIT License
70 stars 8 forks source link

Add support for `from`, `to` and `method` modifiers #64

Closed scripthunter7 closed 1 year ago

scripthunter7 commented 1 year ago

Fix https://github.com/ameshkov/VscodeAdblockSyntax/issues/58

@MasterKia Please try it by clicking here (this is a demo environment almost equivalent to Linguist highlighting).

MasterKia commented 1 year ago

Hi, thank you.

Your demo doesn't see these as wrong but uBO does highlight them as wrong: $from=* $from=example. $from=*fdfsff.d $from=dgfg%#%

Same for $to.

scripthunter7 commented 1 year ago

Yeah, although this is just a highlighter, the full scale linter will filter them out.

MasterKia commented 1 year ago

Will it filter these out too (using multiple $method)? ||example.com$method=get,method=get ||example.com$method=get,method=post

scripthunter7 commented 1 year ago

For now, the linter doesn't filter modifiers at all (this will take about 1 month).

MasterKia commented 1 year ago

Good job, thank you!

scripthunter7 commented 1 year ago

I just checked the uBO doc and the following cases are mishandled in my PR:

||google.com^$method=post|get
||example.com^$method=~get