Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Core/Source/DTTextHTMLElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ - (NSAttributedString *)attributedStringWithContext:(DTHTMLAttributedStringBuild
// useing \r as to not confuse this with line feeds, but still get a single paragraph
text = [text stringByReplacingOccurrencesOfString:@"\n" withString:@"\r"];
}
else if (_containsAppleConvertedSpace)
{
// replace nbsp; with regular space
text = [_text stringByReplacingOccurrencesOfString:UNICODE_NON_BREAKING_SPACE withString:@" "];
}
else
{
text = [_text stringByNormalizingWhitespace];
else
{
if (_containsAppleConvertedSpace) {
// replace nbsp; with regular space
text = [_text stringByReplacingOccurrencesOfString:UNICODE_NON_BREAKING_SPACE withString:@" "];
}
// normalize white space
text = [_text stringByNormalizingWhitespace];
}

NSDictionary *attributes = [self attributesForAttributedStringRepresentationWithContext:context];
Expand Down
2 changes: 1 addition & 1 deletion DTCoreText.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'DTCoreText'
spec.version = '3.0.2'
spec.version = '3.1.0-dev'

spec.license = 'BSD'
spec.source = { :git => 'https://github.com/artifacts/DTCoreText.git', :tag => spec.version.to_s }
Expand Down