-
Notifications
You must be signed in to change notification settings - Fork 268
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
Add ability to use code from ObjC #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for this! I haven't tested your code yet, but it seems to be correct. My only comment so far is about the indentation style. Highlightr is using Allman style, would you please update your PR to follow this style?
@@ -66,7 +66,7 @@ open class CodeAttributedString : NSTextStorage | |||
|
|||
/// Language syntax to use for highlighting. Providing nil will disable highlighting. | |||
open var language : String? | |||
{ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the indentation style
@@ -75,7 +75,7 @@ open class CodeAttributedString : NSTextStorage | |||
|
|||
/// Returns a standard String based on the current one. | |||
open override var string: String | |||
{ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the indentation style
fixedRange.length = (fixedRange.location + fixedRange.length < string.length) ? fixedRange.length : string.length-fixedRange.location | ||
fixedRange.length = (fixedRange.length >= 0) ? fixedRange.length : 0 | ||
self.stringStorage.setAttributes(attrs, range: fixedRange) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the indentation style
} | ||
|
||
|
||
} | ||
|
||
extension CodeAttributedString { | ||
open func setTheme(to theme: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow Allman indentation style.
Related to #13. |
No description provided.