pipeline: Switch to templates for placeholders. #104.
string.format() substitutes all occurrences of {token} with a token in the formatting map. Unfortunately, {m,} is also regex syntax for "match m or more repetitions of preceding regex", and we use {3,} in a global ignore. Solution: Use a different delimiter. Python's string templates look like they give us enough power to do what we need to do, and they won't clobber repetition ranges. Unfortunately, we can't use the default $ delimiter, because $ is a regex metacharacter. %# seems sufficiently unlikely to appear in URLs.
This commit is contained in:
parent
fd1d4f74d3
commit
6be228fe0b
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "singletumblr",
|
||||
"patterns": [
|
||||
" ^http://(?!({primary_netloc}|\\d+\\.media\\.tumblr\\.com|assets\\.tumblr\\.com)).*"
|
||||
" ^http://(?!(%#{primary_netloc}|\\d+\\.media\\.tumblr\\.com|assets\\.tumblr\\.com)).*"
|
||||
],
|
||||
"type": "ignore_patterns"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user