minor tweak to alter_size for font-sizes
This commit is contained in:
parent
2ea1d28e11
commit
a83c006d05
|
@ -23,8 +23,9 @@ def parse_html(value, m):
|
|||
p = "font\-size: [0-9][0-9]?px"
|
||||
matches = re.findall(p, value)
|
||||
for match in matches:
|
||||
s = match.replace("font-size: ", "")
|
||||
val = int(s.replace("px", ""))
|
||||
# reg = r'font-size:[\s?]
|
||||
s = match.replace("font-size:", "")
|
||||
val = int(s.strip().replace("px", ""))
|
||||
new_val = int(round(val * m))
|
||||
r = "font-size: " + str(new_val) + "px"
|
||||
value = value.replace(match, r)
|
||||
|
|
Loading…
Reference in New Issue
Block a user