Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] 單行註解 #33

Open
FlandreDaisuki opened this issue Apr 14, 2019 · 2 comments
Open

[Feature Request] 單行註解 #33

FlandreDaisuki opened this issue Apr 14, 2019 · 2 comments

Comments

@FlandreDaisuki
Copy link
Contributor

目前語法可以對特定規則註解:

rule comment

但希望可以增加單行註解來註解整個規則集,而不用切分檔案:

# 新聞黑名單
rule_1
rule_2
regex_1 comment

# 論壇黑名單
rule_3

感覺可以直接 match 第一個字是 # 就好,雖然 URI 裡 # 是合法字元 (hash),但在連結或頁面的封鎖上去針對 hash 封鎖應該是不合理的,不會造成歧義

@danny0838
Copy link
Owner

danny0838 commented Apr 14, 2019

理論上似乎ok,因為正規表示式規則一定是 / 開頭,而網域規則不能包含 # (不是合法的域名字元)。不過可能還要再評估一下會不會引入其他問題。

在此之前可以在行首輸入一個空白,就可以寫註解了,例如:

 # 新聞黑名單
rule_1
rule_2
regex_1 comment

 # 論壇黑名單
rule_3

@sioxe823
Copy link

sioxe823 commented May 6, 2021

@danny0838 希望可以兼容easylist adblock plus用!作comment sign的格式

https://adblockplus.org/filter-cheatsheet#comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants