Use snake_case
This commit is contained in:
parent
7ad72a6e4f
commit
68949dde6c
|
@ -77,27 +77,27 @@ def __get_attributes(attrs):
|
||||||
|
|
||||||
def __get_style(inline_style_string):
|
def __get_style(inline_style_string):
|
||||||
style = {}
|
style = {}
|
||||||
parsedStyle = parseStyle(inline_style_string)
|
parsed_style = parseStyle(inline_style_string)
|
||||||
if parsedStyle.fontStyle != "":
|
if parsed_style.fontStyle != "":
|
||||||
style["fontStyle"] = parsedStyle.fontStyle
|
style["fontStyle"] = parsed_style.fontStyle
|
||||||
if parsedStyle.fontWeight != "":
|
if parsed_style.fontWeight != "":
|
||||||
style["fontWeight"] = parsedStyle.fontWeight
|
style["fontWeight"] = parsed_style.fontWeight
|
||||||
if parsedStyle.fontSize != "":
|
if parsed_style.fontSize != "":
|
||||||
style["fontSize"] = parsedStyle.fontSize
|
style["fontSize"] = parsed_style.fontSize
|
||||||
if parsedStyle.textDecoration != "":
|
if parsed_style.textDecoration != "":
|
||||||
style["textDecorationLine"] = parsedStyle.textDecoration
|
style["textDecorationLine"] = parsed_style.textDecoration
|
||||||
if parsedStyle.verticalAlign != "":
|
if parsed_style.verticalAlign != "":
|
||||||
style["verticalAlign"] = parsedStyle.verticalAlign
|
style["verticalAlign"] = parsed_style.verticalAlign
|
||||||
if parsedStyle.textAlign != "":
|
if parsed_style.textAlign != "":
|
||||||
style["textAlign"] = parsedStyle.textAlign
|
style["textAlign"] = parsed_style.textAlign
|
||||||
if parsedStyle.listStyleType != "":
|
if parsed_style.listStyleType != "":
|
||||||
style["listStyleType"] = parsedStyle.listStyleType
|
style["listStyleType"] = parsed_style.listStyleType
|
||||||
|
|
||||||
margins = {
|
margins = {
|
||||||
"marginTop": parsedStyle.marginTop,
|
"marginTop": parsed_style.marginTop,
|
||||||
"marginRight": parsedStyle.marginRight,
|
"marginRight": parsed_style.marginRight,
|
||||||
"marginBottom": parsedStyle.marginBottom,
|
"marginBottom": parsed_style.marginBottom,
|
||||||
"marginLeft": parsedStyle.marginLeft,
|
"marginLeft": parsed_style.marginLeft,
|
||||||
}
|
}
|
||||||
for key, val in margins.items():
|
for key, val in margins.items():
|
||||||
m = re.search(r"(\d+(\.\d*)?|\.\d+)em", val)
|
m = re.search(r"(\d+(\.\d*)?|\.\d+)em", val)
|
||||||
|
|
Loading…
Reference in a new issue