Swift 4 version - #4
Conversation
alehed
commented
Aug 21, 2017
Thanks a lot @Mort3m ! This will be merged as soon as the GM Seed comes out. For the meantime you can fix the remaining issues with indentation. As stated in the |
alehed
left a comment
There was a problem hiding this comment.
I can't see if the whitespace diff is from using tabs instead of spaces or just indenting with one space less than usual.
| open func attributedString(for string: String, base: Attributes? = nil) -> NSAttributedString { | ||
| let output = NSMutableAttributedString(string: string, attributes: base) | ||
| let output = NSMutableAttributedString(string: string, attributes: base) |
There was a problem hiding this comment.
This should be 8 spaces instead of seven.
| continue | ||
| } | ||
| let range = result.rangeAt(Int(index)) | ||
| let range = result.range(at: Int(index)) |
| if let value = setting.removeValue(forKey: "foreground") as? String { | ||
| setting[NSForegroundColorAttributeName] = Color(hex: value) | ||
| if let value = setting.removeValue(forKey: NSAttributedStringKey(rawValue: "foreground")) as? String { |
| public var backgroundColor: Color { | ||
| return attributes[Language.globalScope]?[NSBackgroundColorAttributeName] as? Color ?? Color.white | ||
| return attributes[Language.globalScope]?[NSAttributedStringKey.backgroundColor] as? Color ?? Color.white |
| public var foregroundColor: Color { | ||
| return attributes[Language.globalScope]?[NSForegroundColorAttributeName] as? Color ?? Color.black | ||
| return attributes[Language.globalScope]?[NSAttributedStringKey.foregroundColor] as? Color ?? Color.black |
| if let value = setting.removeValue(forKey: "background") as? String { | ||
| setting[NSBackgroundColorAttributeName] = Color(hex: value) | ||
| if let value = setting.removeValue(forKey: NSAttributedStringKey(rawValue: "background")) as? String { |
sund4nce
commented
Aug 21, 2017
Alright @alehed, I will take care of it! |
alehed
left a comment
There was a problem hiding this comment.
Two more lines still contain tabs (53 and 57).
alehed
commented
Aug 21, 2017
Great, thanks! As mentioned, this will be merged as soon as the GM Seed is released by Apple, which is probably going to happen sometime in September. Unfortunately, there is currently no editor-config plugin that works in Xcode… |
alehed
commented
Sep 13, 2017
@Mort3m Thanks a lot for the contribution! 👍 |
Migrated to Swift 4 for a new project.
Thought it might be useful some others as well.
Thanks a lot for you contributions & fixes @alehed!