Skip to content
Browse files

preserve whitespace on text element

  • Loading branch information...
1 parent f96bc3a commit f114e53671316c22d733d5882362a46bb3223adf @odrobnik odrobnik committed Dec 29, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 Core/Source/DTHTMLElementText.m
View
11 Core/Source/DTHTMLElementText.m
@@ -27,7 +27,16 @@ - (void)_appendHTMLToString:(NSMutableString *)string indentLevel:(NSUInteger)in
- (NSAttributedString *)attributedString
{
- NSString *text = [_text stringByNormalizingWhitespace];
+ NSString *text;
+
+ if (self.preserveNewlines)
+ {
+ text = _text;
+ }
+ else
+ {
+ text = [_text stringByNormalizingWhitespace];
+ }
NSDictionary *attributes = [self attributesDictionary];

0 comments on commit f114e53

Please sign in to comment.
Something went wrong with that request. Please try again.