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

Links to MDN are broken with typedoc-plugin-mdn-links since version 4.0.0 #614

Closed
giladgd opened this issue May 11, 2024 · 1 comment
Closed
Labels

Comments

@giladgd
Copy link

giladgd commented May 11, 2024

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

After upgrading to version 4.0.1, the links to MDN generated by typedoc-plugin-mdn-links include a space in the beginning, so they refer to an invalid local path instead of an external website.

Output on version 4.0.0-next.44:

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

Output on version 4.0.1:

#### Returns

[`Promise ↗️`](%20https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise%20)\<`void`\>

By the way, it'd be great if there was a configuration to not add ↗️ to text of external links.

Thanks for making this awesome plugin :)

TypeDoc configuration

{
    "$schema": "https://typedoc.org/schema.json",
    "entryPoints": ["./src/index.ts"],
    "out": "./docs/api",
    "tsconfig": "./tsconfig.json",
    "readme": "./README.md",
    "excludeExternals": true,
    "excludeInternal": true,
    "excludePrivate": true,
    "githubPages": true,
    "hideGenerator": true,
    "jsDocCompatibility": true,
    "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme", "typedoc-plugin-mdn-links"],
    "hideBreadcrumbs": true,
    "hidePageHeader": true,
    "preserveAnchorCasing": true,
    "useCodeBlocks": true,
    "expandObjects": true,
    "expandParameters": true,
    "parametersFormat": "table",
    "propertiesFormat": "list",
    "enumMembersFormat": "table",
    "typeDeclarationFormat": "list",
    "sort": ["source-order"],
    "docsRoot": "./docs"
}

Expected behavior

I expect external links to be valid and start with http and not %20http and end with the content of the original link and not %20

@tgreyuk
Copy link
Member

tgreyuk commented May 15, 2024

Thank you. Fixed in typedoc-plugin-markdown@4.0.2.

@tgreyuk tgreyuk closed this as completed May 24, 2024
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