Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: abp/filters/parser.py

Issue 29845767: Issue 6685 - Offer incremental filter list downloads (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Patch Set: Use iterables instead of str, stop repeating code Created Aug. 20, 2018, 6:18 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | abp/filters/renderer.py » ('j') | abp/filters/renderer.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: abp/filters/parser.py
===================================================================
--- a/abp/filters/parser.py
+++ b/abp/filters/parser.py
@@ -140,9 +140,9 @@
Include = _line_type('Include', 'target', '%include {0.target}%')
-METADATA_REGEXP = re.compile(r'!\s*(\w+)\s*:\s*(.*)')
+METADATA_REGEXP = re.compile(r'!\s*([\w-]+)\s*:\s*(.*)')
METADATA_KEYS = {'Homepage', 'Title', 'Expires', 'Checksum', 'Redirect',
- 'Version'}
+ 'Version', 'Diff-URL', 'Diff-Expires'}
Sebastian Noack 2018/08/21 19:42:45 I would prefer if python-abp would be agnostic of
Vasily Kuznetsov 2018/08/22 13:10:50 Makes sense and I support it. I actually thought i
Sebastian Noack 2018/08/22 14:31:06 You are right, well spotted.
rhowell 2018/08/27 22:06:26 It appears this was done to prevent mistaking a co
INCLUDE_REGEXP = re.compile(r'%include\s+(.+)%')
HEADER_REGEXP = re.compile(r'\[(Adblock(?:\s*Plus\s*[\d\.]+?)?)\]', flags=re.I)
HIDING_FILTER_REGEXP = re.compile(r'^([^/*|@"!]*?)#([@?])?#(.+)$')
« no previous file with comments | « no previous file | abp/filters/renderer.py » ('j') | abp/filters/renderer.py » ('J')

Powered by Google App Engine
This is Rietveld