Skip to content

Commit

Permalink
Merge pull request aaronsw#100 from DistPub/bug/get-element-style-not…
Browse files Browse the repository at this point in the history
…-check-dict-key

🐛 fix get element style key error

Thanks Smite Chow @lovemyliwu
  • Loading branch information
Alir3z4 committed Nov 6, 2015
2 parents c4d3d43 + 9ed7df7 commit bff88db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html2text/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def element_style(attrs, style_def, parent_style):
style = parent_style.copy()
if 'class' in attrs:
for css_class in attrs['class'].split():
css_style = style_def['.' + css_class]
css_style = style_def.get('.' + css_class, {})
style.update(css_style)
if 'style' in attrs:
immediate_style = dumb_property_dict(attrs['style'])
Expand Down

0 comments on commit bff88db

Please sign in to comment.