Typedoc: {@link with#hash and multi-word text} doesn't transpile to html anchor tag

Created on 16 Jun 2019  路  3Comments  路  Source: TypeStrong/typedoc

Thank good tool.

According to https://devdocs.io/jsdoc/tags-inline-link#syntax we can refer to namepathOrURL with a viewed _multi-word text_ using below syntax:

{@link namepathOrURL multi-word text}
[multi-word text]{@link namepathOrURL}
{@link namepathOrURL|multi-word text}

Expected Behavior

All the above examples should be transpile to: multi-word text.

In HTML:

<a href="namepathOrURL">multi-word text</a>

Actual Behavior

But as I tested when namepathOrURL contains # symbol and the text contains one or more spaces (or some other non-word character) it's only transpiled to a plain text (as it was):

https://htmlpreview.github.io/?https://raw.githubusercontent.com/mirismaili/text-wrapper/c5e9373adbb052b2c56f896fc267ae4f6fa79e2d/docs/classes/textwrapper.html

image

From:

https://github.com/mirismaili/text-wrapper/blob/c5e9373adbb052b2c56f896fc267ae4f6fa79e2d/src/TextWrapper.ts

/**
 * The main class of this library.
 *
 * {@link TextWrapper#constructor Create an instance} (with or without {@link WrapOptions options}) and then use
 * {@linkcode TextWrapper#wrap wrap()} method to do the task.
 *
 * Created at 1398/2/6 (2019/4/26).
 * @author {@link https://mirismaili.github.io S. Mahdi Mir-Ismaili}
 *
 * @see {@link TextWrapper#constructor The constructor}
 * @see {@linkcode TextWrapper#wrap wrap()}
 */
export default class TextWrapper implements WrapOptions {
// ...

Steps to reproduce the bug

git clone --branch typedoc-test --depth 1 https://github.com/mirismaili/text-wrapper && cd text-wrapper

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 && npm i  # Puppeteer is in devDependencies and we don't need to it for this test

rm -rf docs && npm run typedoc

Then visit .../text-wrapper/docs/classes/textwrapper.html.

Environment

  • Typedoc version: 0.14.2
  • Node.js version: 11.11.0
  • OS: Windows 10
no bug question

Most helpful comment

TypeDoc does not implement all of JSDoc's features (and vise-versa), we will eventually adopt the TSDoc standard, but that heavily depends on the time required to implement it.

In your particular case, TypeDoc doesn't support the # character for separating classes and members. You must use . instead.

All 3 comments

TypeDoc does not implement all of JSDoc's features (and vise-versa), we will eventually adopt the TSDoc standard, but that heavily depends on the time required to implement it.

In your particular case, TypeDoc doesn't support the # character for separating classes and members. You must use . instead.

Oh! thanks. I didn't know this difference between JSDoc and TSDoc. I replaced all # with ..

OK:
https://htmlpreview.github.io/?https://github.com/mirismaili/text-wrapper/blob/1f13a783060c37865fcc6edb54558b673f50a3c8/docs/classes/textwrapper.html

@mirismaili If I understand correctly, you were able to get the links working. If there is still an issue we can reopen this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

unsafecode picture unsafecode  路  4Comments

atomsoftwarestudios picture atomsoftwarestudios  路  4Comments

3nsoft picture 3nsoft  路  3Comments

goodmind picture goodmind  路  3Comments

topherfangio picture topherfangio  路  3Comments