Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Jul 27, 2015
2 parents 0b4faf5 + 18c4f42 commit 84fe3e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/format.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ class Format
return this.remove(node) unless value
return node if this.value(node) == value
if _.isString(@config.parentTag)
parentNode = document.createElement(@config.parentTag)
dom(node).wrap(parentNode)
parentNode = node.parentNode;
if parentNode.tagName != @config.parentTag
parentNode = document.createElement(@config.parentTag)
dom(node).wrap(parentNode)
if node.parentNode.tagName == node.parentNode.previousSibling?.tagName
dom(node.parentNode.previousSibling).merge(node.parentNode)
if node.parentNode.tagName == node.parentNode.nextSibling?.tagName
Expand Down

0 comments on commit 84fe3e8

Please sign in to comment.