Skip to content

Commit

Permalink
Ignore child nodes with display:none when building attributed string …
Browse files Browse the repository at this point in the history
…for node Cocoanetics#738
  • Loading branch information
odrobnik committed Jul 4, 2014
1 parent 6e10dbf commit 76c6cdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Core/Source/DTHTMLElement.m
Expand Up @@ -432,6 +432,11 @@ - (NSAttributedString *)attributedString

for (DTHTMLElement *oneChild in self.childNodes)
{
if (oneChild.displayStyle == DTHTMLElementDisplayStyleNone)
{
continue;
}

// if previous node was inline and this child is block then we need a newline
if (previousChild && previousChild.displayStyle == DTHTMLElementDisplayStyleInline)
{
Expand Down

0 comments on commit 76c6cdd

Please sign in to comment.