Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Custom link descriptions and Links to remote members #237

Closed
kenji21 opened this Issue · 7 comments

2 participants

@kenji21

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

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

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
@kenji21 kenji21 referenced this issue from a commit in kenji21/appledoc
@kenji21 kenji21 Tests and implementation for links with references to [Class method] …
…with custom title. Refs #237
15817ad
@kenji21 kenji21 referenced this issue from a commit in kenji21/appledoc
@kenji21 kenji21 Fixing title with space not managed. Refs #237 beee592
@kenji21 kenji21 referenced this issue from a commit in kenji21/appledoc
@kenji21 kenji21 Fixing using specials chars in custom title. Refs #237 d0800f9
@tomaz tomaz closed this in 5a442eb
@kenji21

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
@tomaz
Owner

Sure, here you go :)

@kenji21

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

  [this method]([GBClass method:])
@kenji21 kenji21 referenced this issue from a commit in kenji21/appledoc
@kenji21 kenji21 Fixing links with custom title detection (custom titles like [this me…
…thod] now works) and markdown generation. Refs #237
c8b2b2e
@tomaz tomaz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@tomaz
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.