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

not parsing {@link} tag #185

Closed
stefangabos opened this issue Sep 28, 2016 · 6 comments
Closed

not parsing {@link} tag #185

stefangabos opened this issue Sep 28, 2016 · 6 comments

Comments

@stefangabos
Copy link

stefangabos commented Sep 28, 2016

I don't know if I'm doing something wrong or not, but I cannot get dox to parse stuff like

This is some description which contains a {@link [url]|label} to a resource

It's no working no matter what combinations I use, like {@link [url]}, {@link #somethingInternal}, etc

Help? Thanks!

@Twipped
Copy link
Collaborator

Twipped commented Sep 28, 2016

I've never seen this syntax before, is it something in the jsdoc spec? Dox uses markdown for its html parsing, so the syntax to use would be [label](link)

@stefangabos
Copy link
Author

stefangabos commented Sep 28, 2016

http://usejsdoc.org/tags-inline-link.html

I use it mostly to reference other methods of the same library. The good thing about it is that it builds link automatically - I just add {@link method_name} and I don't have to worry about it. Using [label](link) for this would be far more complicated

@mchalapuk
Copy link

I wonder, why would you need a tag for external links instead of simply using markdown?

[anchor text](url)

or

[anchor text][label]

[label]: url

@stefangabos
Copy link
Author

The @link tag is used both for internal links (this is my problem) as well as external links. For external links, of course, it is easy. For internal links I would need to know the URL generated by JSDoc for every class/method in my library - cool if it is small, not so cool if it is a large library.

I just want to use {@link my_methods_name} and not worry about the file structure generated by JSDoc.

But don't worry about it, I used a different jsdoc interpreter but thanks for taking the time and looking into this

@Twipped
Copy link
Collaborator

Twipped commented Oct 17, 2016

Just out of curiosity, which one did you use?

There's two big issues with implementing this:

  1. Currently we don't do anything with the contents of descriptions, and I'm hesitant to start parsing those. It kinda seems like something implementors should do.
  2. If we were to parse them, what do we do with the parsed links? Best I can think of is to turn them into markdown links.

@stefangabos
Copy link
Author

I am using JsDoc as it proved to support the vast majority (if not all) of the features of JavaDoc, together with a slightly modified version of Docdash theme. The result is at https://stefangabos.github.io/zebrajs/ For an example of the usage of {@link} tag you can see https://stefangabos.github.io/zebrajs/$.html#width where I point users to another method with See .outerWidth() for getting...

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

No branches or pull requests

3 participants