AdguardTeam / AdguardTeam/FiltersCompiler

Invalid conversion to uBO syntax - `[$path]`

Open
#264 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
64
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Matching "the main page only" `[$path]` should be converted to `:matches-path(/^/$/)`
uBO's example: https://github.com/gorhill/ublock/wiki/Procedural-cosmetic-filters#subjectmatches-patharg:~:text=%3Amatches%2Dpath(/%5E/%24/)

Original
```adblock
[$path]fontanka.ru#?#.gridContainer > div[class*="grid"]:has(> section[class^="baseBlock_"] > a[href]:contains(/^(Новости компаний|Фонтанка PRO)$/))
```

Converted to uBO:
```adblock
fontanka.ru#?#:matches-path(/^/$/) .gridContainer > div[class*="grid"]:has(> section[class^="baseBlock_"] > a[href]:contains(/^(Новости компаний|Фонтанка PRO)$/))
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.