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

Add ability to use code from ObjC #14

Closed
wants to merge 2 commits into from

Conversation

zx500xl
Copy link

@zx500xl zx500xl commented Feb 3, 2017

No description provided.

@raspu raspu mentioned this pull request Feb 3, 2017
Copy link
Owner

@raspu raspu left a 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?
{
{
Copy link
Owner

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
{
{
Copy link
Owner

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)
{
Copy link
Owner

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) {
Copy link
Owner

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.

@raspu
Copy link
Owner

raspu commented Feb 3, 2017

Related to #13.

@raspu raspu closed this Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants