Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

avoid whitespace at begin of new line after BR

  • Loading branch information...
commit f96bc3a73d72734c2839973c4e8d7d410c445b4e 1 parent cfb0ed2
@Cocoanetics authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Core/Source/DTHTMLElement.m
View
4 Core/Source/DTHTMLElement.m
@@ -384,7 +384,7 @@ - (NSAttributedString *)attributedString
if (oneChild.displayStyle == DTHTMLElementDisplayStyleBlock)
{
// trim off whitespace suffix
- while ([[tmpString string] hasSuffix:@" "])
+ while ([[tmpString string] hasSuffixCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]])
{
[tmpString deleteCharactersInRange:NSMakeRange([tmpString length]-1, 1)];
}
@@ -399,7 +399,7 @@ - (NSAttributedString *)attributedString
if (nodeString)
{
// we already have a white space in the string so far
- if ([[tmpString string] hasSuffix:@" "])
+ if ([[tmpString string] hasSuffixCharacterFromSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]])
{
while ([[nodeString string] hasPrefix:@" "])
{
Please sign in to comment.
Something went wrong with that request. Please try again.