Custom link descriptions and Links to remote members #237

Closed
kenji21 opened this Issue Aug 10, 2012 · 7 comments

Projects

None yet

2 participants

@kenji21
Contributor
kenji21 commented Aug 10, 2012

Hi,

I try to add a link to :

[this method]([GBClass method:])

As said in http://gentlebytes.com/appledoc-docs-comments/

But I get a warning :

WARN | Invalid [method:]([GBClass method:] reference found near OtherClass.h@17, unknown object!

Then, diving into the code make me get a clue by changing the log from (GBCommentsProcessor.m:872) :

            if (self.settings.warnOnInvalidCrossReference) GBLogXWarn(self.currentSourceInfo, @"Invalid %@ reference found near %@, unknown object!", linkText, self.currentSourceInfo);

to :

            if (self.settings.warnOnInvalidCrossReference) GBLogXWarn(self.currentSourceInfo, @"Invalid %@ reference found near %@, unknown object : %@ !", linkText, self.currentSourceInfo, objectName);

Found that it tries to find a linke to an object named : "method]([GBClass"

@tomaz
Owner
tomaz commented Aug 10, 2012

While Markdown pre processing works for most of the cases, it's unreliable at best. This part of the tool saw much change when converting from original custom parsing to full fledged Markdown library. I don't expect to do much work on this part, it would take too much time. Instead I'll make it "shine" on 3.0 (experimental branch).

@kenji21
Contributor
kenji21 commented Aug 10, 2012

Ok, I made it works by updating the remoteMemberCrossReferenceRegex and updating the dataForRemoteMemberLinkInString method for managing the new group containing expected link displayed text.

I'll fork and send you a pull request for this feature.

Launched the GHUnit tests and none are failing.I will try to write a test for validating the new link management before sending the pull request.

@tomaz
Owner
tomaz commented Aug 10, 2012

Cool, thanks, will merge asap!

On Fri, Aug 10, 2012 at 6:01 PM, kenji21 notifications@github.com wrote:

Ok, I made it works by updating the remoteMemberCrossReferenceRegex and
updating the dataForRemoteMemberLinkInString method for managing the new
group containing expected link displayed text.

I'll fork and send you a pull request for this feature.

Launched the GHUnit tests and none are failing.I will try to write a test
for validating the new link management before sending the pull request.


Reply to this email directly or view it on GitHubhttps://github.com/tomaz/appledoc/issues/237#issuecomment-7648828.

@kenji21 kenji21 added a commit to kenji21/appledoc that referenced this issue Aug 13, 2012
@kenji21 kenji21 Tests and implementation for links with references to [Class method] …
…with custom title. Refs #237
15817ad
@kenji21 kenji21 added a commit to kenji21/appledoc that referenced this issue Aug 13, 2012
@kenji21 kenji21 Fixing title with space not managed. Refs #237 beee592
@kenji21 kenji21 added a commit to kenji21/appledoc that referenced this issue Aug 13, 2012
@kenji21 kenji21 Fixing using specials chars in custom title. Refs #237 d0800f9
@tomaz tomaz closed this in 5a442eb Aug 13, 2012
@kenji21
Contributor
kenji21 commented Aug 13, 2012

Can you reopen the issue, found another bug that occurs if two custom titled links are in the input, for example :

"[doSomething:withVars:]([Class doSomething:withVars:]), [text](-[Class method])"
@tomaz tomaz reopened this Aug 13, 2012
@tomaz
Owner
tomaz commented Aug 13, 2012

Sure, here you go :)

@kenji21
Contributor
kenji21 commented Aug 13, 2012

Found that the issue was not on this, but on title that matches the remote link regex :

  [this method]([GBClass method:])
@kenji21 kenji21 added a commit to kenji21/appledoc that referenced this issue Aug 13, 2012
@kenji21 kenji21 Fixing links with custom title detection (custom titles like [this me…
…thod] now works) and markdown generation. Refs #237
c8b2b2e
@tomaz
Owner
tomaz commented Dec 6, 2012

Just realized this is already being handled by #180, am closing this ticket to prevent duplication and it wasn't updated a long time anyway.

@tomaz tomaz closed this Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment