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

Static and inner methods have same HTML ID #539

Closed
Scimonster opened this issue Nov 26, 2013 · 1 comment
Closed

Static and inner methods have same HTML ID #539

Scimonster opened this issue Nov 26, 2013 · 1 comment
Labels
Milestone

Comments

@Scimonster
Copy link

I'm using 3.3.0-alpha2.

I have exports.info and also function info() in my code. JSDoc correctly separates them as being static and inner, but i can't link to the second. They both have the same id attribute: info. What probably should be is static-info and inner-info, for all methods, not just conflicts.

@hegemonic
Copy link
Contributor

Fixed on master. We now prepend the scope character to the id attribute (except for instance members, since that would result in confusing-looking links like Foo.html##bar). We also ensure that each id attribute is unique within its output file.

For example, here's a list of longnames and the link we generate to each one:

  • Foo.bar: Foo.html#.bar
  • Foo~baz: Foo.html#~baz
  • Foo#qux: Foo.html#qux

Note that HTML5 allows punctuation in IDs, even though HTML4 did not. Whitespace characters are not allowed, so we now strip whitespace from IDs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants