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

Unicode characters kill the parsing of all subsequent // MARK tags #131

Closed
brennon opened this issue Dec 30, 2014 · 3 comments
Closed

Unicode characters kill the parsing of all subsequent // MARK tags #131

brennon opened this issue Dec 30, 2014 · 3 comments

Comments

@brennon
Copy link

brennon commented Dec 30, 2014

Using // MARK ... is super useful in breaking up jazzy's outputted documentation. With code such as this:

/**
    Returns the location of one of the gesture's touches in the local
    coordinate system of a given node.    
*/
func locationOfTouch(touchIndex index: Int, inNode node: SKNode?) -> CGPoint {
    return trackingTouches[index].locationInNode(node)
}

// MARK: Getting the Recognizer’s State and Node

I get delicious output. However, if I change that to this:

/**
    Returns the location of one of the gesture’s touches in the local
    coordinate system of a given node.    
*/
func locationOfTouch(touchIndex index: Int, inNode node: SKNode?) -> CGPoint {
    return trackingTouches[index].locationInNode(node)
}

// MARK: Getting the Recognizer’s State and Node

That // MARK and every one that follows is not parsed. The difference between the two chunks of source is hard to spot--it's the single quotation mark/inverted comma: ’ vs. '

To be clear, every // MARK before the non-ASCII/Unicode character is parsed. In addition, all of my other documentation is parsed. The problem is exactly and only this: any // MARK preceded in the original source by a non-ASCII character is not produced in the outputted documentation.

@brennon
Copy link
Author

brennon commented Dec 30, 2014

I just noticed this--the quotes in the // MARKs themselves can be non-ASCII (as they are in these two examples). The first example in my original report includes: "Getting the Recognizer’s State and Node" as the mark's text--that's a non-ASCII single quote in "Recognizer’s". I've double-checked that this doesn't cause any problems. The problem seems to be only with non-ASCII characters in the Headerdoc/Appledoc/reSTy (whatever we're calling them) documentation comments.

@jpsim
Copy link
Collaborator

jpsim commented Jan 1, 2015

Thanks for reporting this! I just pushed a fix to sourcekitten, which will be included in the next release.

@segiddins
Copy link
Collaborator

@jpsim did you add a small test case for this?

jpsim added a commit that referenced this issue Jan 2, 2015
@pigeondotdev pigeondotdev modified the milestone: The Past Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants