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

Side navbar (TOC) doesn't display content in escaped angle brackets #2021

Closed
ayush000 opened this issue Nov 20, 2019 · 3 comments · Fixed by #2022
Closed

Side navbar (TOC) doesn't display content in escaped angle brackets #2021

ayush000 opened this issue Nov 20, 2019 · 3 comments · Fixed by #2022
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. status: needs triage This issue has not been triaged by maintainers

Comments

@ayush000
Copy link

🐛 Bug Report

TOC generated in side navbar doesn't honor escaping of angular brackets. Instead all content within angular brackets gets stripped.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Add ### function1 [array\<string>] as h3 in a markdown file (note the backslash)

Expected behavior

Both AUTOGENERATED_TABLE_OF_CONTENTS, and side navbar render it correctly as function1 [array<string>]

Actual Behavior

AUTOGENERATED_TABLE_OF_CONTENTS renders it correctly as function1 [array<string>] but side navbar renders it as function1 [array] instead. Side navbar generation doesn't
image

Reproducible Demo

  1. Clone my fork of jest repo
  2. checkout branch patch-1
  3. cd into website folder
  4. Run yarn && yarn start
  5. Go to http://localhost:3000/docs/en/configuration#coveragepathignorepatterns-arraystring

The corresponding markdown is generated differently for AUTOGENERATED_TABLE_OF_CONTENTS and sidebar. Angle brackets are missing in generated side navbar contents.

@ayush000 ayush000 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Nov 20, 2019
@ayush000
Copy link
Author

This is an issue with v1.14.0

@yangshun
Copy link
Contributor

Try using &lt; and &gt;? It's rendered as HTML.

@ayush000
Copy link
Author

Thanks @yangshun ! Using &lt; and &gt; fixes the problem.

I am keeping the issue open because using angle brackets should also output the same result in both TOC and sidebar nav.

@yangshun yangshun added the help wanted Asking for outside help and/or contributions to this particular issue or PR. label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. status: needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants