Skip to content

Commit

Permalink
Fix Chrome preformat bug
Browse files Browse the repository at this point in the history
Closes #423
  • Loading branch information
jhchen committed Jul 23, 2015
1 parent c55e0d5 commit 3a6f2d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/normalizer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class Normalizer
node.style[style] = value
node.removeAttribute(attribute)
)
# Chrome turns <b> into style in some cases
if (node.style.fontWeight == 'bold')
node.style.fontWeight = ''
dom(node).wrap(document.createElement('b'))
this.whitelistStyles(node)
return this.whitelistTags(node)

Expand Down

0 comments on commit 3a6f2d4

Please sign in to comment.