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

Prepare release 1.17.0 #1272

Merged
merged 4 commits into from
Mar 17, 2020
Merged
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
14 changes: 13 additions & 1 deletion Aztec/Classes/TextKit/LayoutManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ private extension LayoutManager {
}
}


// MARK: - Lists Helpers
//
private extension LayoutManager {
Expand Down Expand Up @@ -360,3 +359,16 @@ private extension LayoutManager {
}
}
}

extension LayoutManager {

override func underlineGlyphRange(_ glyphRange: NSRange, underlineType underlineVal: NSUnderlineStyle, lineFragmentRect lineRect: CGRect, lineFragmentGlyphRange lineGlyphRange: NSRange, containerOrigin: CGPoint) {

var updatedGlyphRange = glyphRange
if glyphRange.endLocation == lineGlyphRange.endLocation {
updatedGlyphRange = NSRange(location: glyphRange.location, length: glyphRange.length - 1)
}
drawUnderline(forGlyphRange: updatedGlyphRange, underlineType: underlineVal, baselineOffset: 0, lineFragmentRect: lineRect, lineFragmentGlyphRange: lineGlyphRange, containerOrigin: containerOrigin)
}
}

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.17.0
-----
* Fix drawing of underlines when they have a nbsp and span to the end of a line

1.16.0
-----
* Improve display of ordered lists with large bullet numbers
Expand Down
4 changes: 4 additions & 0 deletions Example/AztecExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
F1D3610B20929F0200B4E7A5 /* WordPressEditor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1D3610420929E6D00B4E7A5 /* WordPressEditor.framework */; };
FF149F4A20E3C49A0070FECB /* imagesOverlays.html in Resources */ = {isa = PBXBuildFile; fileRef = FF149F4920E3C49A0070FECB /* imagesOverlays.html */; };
FF1FD05C20932EDE00186384 /* gutenberg.html in Resources */ = {isa = PBXBuildFile; fileRef = FF1FD05B20932EDE00186384 /* gutenberg.html */; };
FF1FEC7E2406E071006221AA /* underline.html in Resources */ = {isa = PBXBuildFile; fileRef = FF1FEC7D2406E071006221AA /* underline.html */; };
FF5CDACD239E78B200CF235B /* failedMedia.html in Resources */ = {isa = PBXBuildFile; fileRef = FF5CDACC239E78B200CF235B /* failedMedia.html */; };
FF629DC9223BC418004C4106 /* videoShortcodes.html in Resources */ = {isa = PBXBuildFile; fileRef = FF629DC8223BC418004C4106 /* videoShortcodes.html */; };
FF9AF5481DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FF9AF5471DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard */; };
Expand Down Expand Up @@ -160,6 +161,7 @@
F1D360FC20929E6D00B4E7A5 /* WordPressEditor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WordPressEditor.xcodeproj; path = ../WordPressEditor/WordPressEditor.xcodeproj; sourceTree = "<group>"; };
FF149F4920E3C49A0070FECB /* imagesOverlays.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = imagesOverlays.html; sourceTree = "<group>"; };
FF1FD05B20932EDE00186384 /* gutenberg.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = gutenberg.html; sourceTree = "<group>"; };
FF1FEC7D2406E071006221AA /* underline.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = underline.html; sourceTree = "<group>"; };
FF5CDACC239E78B200CF235B /* failedMedia.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = failedMedia.html; sourceTree = "<group>"; };
FF629DC8223BC418004C4106 /* videoShortcodes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = videoShortcodes.html; sourceTree = "<group>"; };
FF9AF5471DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AttachmentDetailsViewController.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -214,6 +216,7 @@
FF629DC8223BC418004C4106 /* videoShortcodes.html */,
FF5CDACC239E78B200CF235B /* failedMedia.html */,
FFC6772123D07E3E00B76815 /* bigLists.html */,
FF1FEC7D2406E071006221AA /* underline.html */,
);
path = SampleContent;
sourceTree = "<group>";
Expand Down Expand Up @@ -465,6 +468,7 @@
59280F2B1D47CAF40083FB59 /* SampleText.rtf in Resources */,
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */,
FF149F4A20E3C49A0070FECB /* imagesOverlays.html in Resources */,
FF1FEC7E2406E071006221AA /* underline.html in Resources */,
FFC41BDE20DBC7BA004DFB4D /* video.html in Resources */,
FF9AF5481DB0E4E200C42ED3 /* AttachmentDetailsViewController.storyboard in Resources */,
);
Expand Down
2 changes: 1 addition & 1 deletion Example/Example/SampleContent/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>Character Styles</h2>
Underline: <u>Underlined text</u><br/>
Strikethrough: <del>Strikethrough</del><br/>
Colors: <span style="color: royalblue;">Royal Blue by name</span> <span style="color: #ff0000;">Red by hex</span><br/><br/>
Undeline with CSS: <span style="text-decoration: underline;">Alternative underline text</span><br/>
Underline with CSS: <span style="text-decoration: underline;">Alternative underline text</span><br/>
Links: <a href="http://www.wordpress.com">I'm a link!</a><br/> <a href="http://www.wordpress.com" target="_blank">Open in new window link!</a> <br/>
Code: <code>print("Hello world")</code>

Expand Down
4 changes: 4 additions & 0 deletions Example/Example/SampleContent/underline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p><u>Hello&nbsp;world</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>
1 change: 1 addition & 0 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ViewController: UITableViewController
DemoRow(title: "Video Demo", action: { self.showEditorDemo(filename: "video", wordPressMode: false) }),
DemoRow(title: "Failed Media", action: { self.showEditorDemo(filename: "failedMedia") }),
DemoRow(title: "Big Lists", action: { self.showEditorDemo(filename: "bigLists") }),
DemoRow(title: "Underline NBSP", action: { self.showEditorDemo(filename: "underline")}),
DemoRow(title: "Empty Demo", action: { self.showEditorDemo() })
]
),
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.16.0'
s.version = '1.17.0'
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.16.0'
s.version = '1.17.0'
s.summary = 'The WordPress HTML Editor.'

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