Python 3.6 invalid escape sequence deprecation fix (#144)

(see https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior)
This commit is contained in:
Ville Skyttä 2017-05-09 23:07:06 +03:00 committed by Eduard Braun
parent 62b16c11d8
commit 75bacbc8e6

View file

@ -1411,7 +1411,7 @@ def removeDuplicateGradients(doc):
# for each element that referenced the gradient we are going to replace dup_id with master_id # for each element that referenced the gradient we are going to replace dup_id with master_id
dup_id = dupGrad.getAttribute('id') dup_id = dupGrad.getAttribute('id')
funcIRI = re.compile('url\([\'"]?#' + dup_id + '[\'"]?\)') # matches url(#a), url('#a') and url("#a") funcIRI = re.compile('url\\([\'"]?#' + dup_id + '[\'"]?\\)') # matches url(#a), url('#a') and url("#a")
for elem in referencedIDs[dup_id][1]: for elem in referencedIDs[dup_id][1]:
# find out which attribute referenced the duplicate gradient # find out which attribute referenced the duplicate gradient
for attr in ['fill', 'stroke']: for attr in ['fill', 'stroke']: