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

Rendering of & as & in TOC #2224

Closed
ilg-ul opened this issue Apr 9, 2023 · 5 comments
Closed

Rendering of & as & in TOC #2224

ilg-ul opened this issue Apr 9, 2023 · 5 comments
Labels
bug Functionality does not match expectation
Milestone

Comments

@ilg-ul
Copy link

ilg-ul commented Apr 9, 2023

Search terms

TOC, ampersand

Expected Behavior

Render ampersand in TOC as &.

Actual Behavior

Ampersand in TOC is rendered as &.

Steps to reproduce the bug

Screenshot 2023-04-09 at 09 00 58

Environment

  • Typedoc version: 0.24.1
  • TypeScript version: 4.9.5
  • Node.js version: 16.19.1
  • OS: macOS 12.6.3
@ilg-ul ilg-ul added the bug Functionality does not match expectation label Apr 9, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 9, 2023

Shoot, I totally forgot that content would already be escaped... interesting dilemma here actually, since in-line elements probably should be stripped when generating the TOC. Ideally, I think getting the text from .textContent on the header should be shown, which is kind of annoying to get without DOM apis.

@Gerrit0 Gerrit0 added this to the v0.24.2 milestone Apr 10, 2023
@krassowski
Copy link

We see something possibly related over at jupyterlab/jupyterlab#14367 (sorry, I was not sure if you prefer new issues or comment here) - the link in the title is rendered as HTML:

The title in question is # [JupyterLab](http://jupyterlab.github.io/jupyterlab/) in markdown (and actually ideally we skip it as this is just the title).

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 13, 2023

Yep, this is the same underlying issue

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 15, 2023

Wow, that was a lesson in insanity! HTML entities are special.

@ilg-ul
Copy link
Author

ilg-ul commented Apr 17, 2023

I confirm, with v0.24.2 the TOC is rendered correctly in my projects.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

3 participants