Skip to content

Commit

Permalink
Merge pull request #1292 from wordpress-mobile/release/1.19.2
Browse files Browse the repository at this point in the history
Release 1.19.2
  • Loading branch information
SergioEstevao authored May 26, 2020
2 parents be24064 + 23e4090 commit 93f0a5a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Aztec/Classes/TextKit/LayoutManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ extension LayoutManager {
let underlinedString = textStorage.attributedSubstring(from: glyphRange).string
var updatedGlyphRange = glyphRange
if glyphRange.endLocation == lineGlyphRange.endLocation,
underlinedString.contains(String.init(.nonBreakingSpace)),
underlinedString.hasSuffix(String.init(.paragraphSeparator))
underlinedString.hasSuffix(String.init(.paragraphSeparator)) || underlinedString.hasSuffix(String.init(.lineSeparator)) || underlinedString.hasSuffix(String.init(.carriageReturn)) || underlinedString.hasSuffix(String.init(.lineFeed))
{
updatedGlyphRange = NSRange(location: glyphRange.location, length: glyphRange.length - 1)
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.19.2
-------
* Fix drawing of underlines when they include newlines.

1.19.1
-------
* Fix a bug where collapse of whitespaces was happening for empty HTML nodes.
Expand Down
3 changes: 2 additions & 1 deletion Example/Example/SampleContent/underline.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<p><u>Hello&nbsp;world</u></p>
<p><u>No NBSP</u></p>
<p><u>With&nbsp;NBSP</u></p>
<p><span style="text-decoration: underline;">Alternative&nbsp;underline&nbsp;text</span></p>
<p>Before link <a href="www.wordpress.com">Link&nbsp;to&nbsp;WordPress</a></p>
<p>Before link <a href="www.jetpack.com">Link&nbsp;to&nbsp;Jetpack</a> After link</p>
Expand Down
2 changes: 1 addition & 1 deletion WordPress-Aztec-iOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'WordPress-Aztec-iOS'
s.version = '1.19.1'
s.version = '1.19.2'
s.summary = 'The native HTML Editor.'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion WordPress-Editor-iOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'WordPress-Editor-iOS'
s.version = '1.19.1'
s.version = '1.19.2'
s.summary = 'The WordPress HTML Editor.'

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit 93f0a5a

Please sign in to comment.