removed quot replacement
This commit is contained in:
1 parent
080b1bf595
commit
2f3f45151d
1 file changed
+1
-1
@@ -27,7 +27,7 @@ def style_to_string(style: dict[str, str]) -> str:
|
|||||||
def format(soup: BeautifulSoup) -> None:
|
def format(soup: BeautifulSoup) -> None:
|
||||||
for element in soup.find_all(attrs={"dj-style": True}):
|
for element in soup.find_all(attrs={"dj-style": True}):
|
||||||
style = parse_style(element["style"])
|
style = parse_style(element["style"])
|
||||||
dj_style = element.get("dj-style").replace(""", '"')
|
dj_style = element.get("dj-style")
|
||||||
for name, value, value_type in [declaration.split(";") for declaration in dj_style.split("~") if declaration]:
|
for name, value, value_type in [declaration.split(";") for declaration in dj_style.split("~") if declaration]:
|
||||||
style[name] = f"{{{{ {value} }}}}{value_type}"
|
style[name] = f"{{{{ {value} }}}}{value_type}"
|
||||||
element["style"] = style_to_string(style)
|
element["style"] = style_to_string(style)
|
||||||
|
|||||||
Reference in new issue
Block a user