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

[BUG] Wrong URL generated for inline {@link} doc #264

Closed
kajnelissen opened this issue Aug 4, 2017 · 3 comments
Closed

[BUG] Wrong URL generated for inline {@link} doc #264

kajnelissen opened this issue Aug 4, 2017 · 3 comments

Comments

@kajnelissen
Copy link

Overview of the issue

I used an inline {@link} doc in one of my classes which links to a class definition. Both class definitions are located in the same source file. See the code below for an example.

export class LoggerOptions {
    level: string;
}

/**
 *
 */
@Injectable()
export class LoggerService {

    /**
     * Instantiates new Logger instance. By default a logger is instantiated with a set of default options.
     * Override these options by passing a {@link LoggerOptions} object to the constructor.
     *
     * @param {LoggerOptions} options
     */
    public constructor( @Optional() options?: LoggerOptions) { 
        // some code
    }
}

When I generate the documentation with Compodoc, the links for the parameters get generated correctly. The generated link for the inline comment is wrong however. Because it's missing a /, it appends the URL to the URL path of the current page. See the image below (red is wrong, green is correct):

Example

Operating System, Node.js, npm, compodoc version(s)
  • OS: Windows 10
  • Node: version 6.10.2
  • NPM: version 4.4.4
  • Compodoc: version 1.0.0-beta.13
@Zyzle
Copy link

Zyzle commented Aug 24, 2017

@vogloblinsky I think this may need to be re-opened as this still seems to be an issue in beta-14 for me when an {@link ...} is used on a function that will later be placed in the miscellaneous/ folder. The link generated from them lacks the leading ../

@vogloblinsky vogloblinsky reopened this Aug 24, 2017
@benjamincharity
Copy link

I'm seeing this also. When linking from a type definition to a component, the generated URL doesn't take into account the new nesting of the type inside miscellaneous.

screen shot 2017-08-29 at 9 43 57 am

  • Generated link: components/TsInputComponent.html
  • Correct link: ../components/TsInputComponent.html

  • OS: OS X Sierra
  • Node: 8.0.0
  • NPM: 5.3.0
  • Compodoc: 1.0.0-beta.14

@vogloblinsky vogloblinsky modified the milestones: 1.0.0-beta.15, 1.0.0-beta.14, 1.0.0-beta.16 Aug 29, 2017
@lock
Copy link

lock bot commented Oct 1, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants