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] Docs table of contents sidebar generates code block as back tick marks #2741

Open
Tracked by #1925
xelaint opened this issue Jan 30, 2024 · 4 comments
Open
Tracked by #1925
Labels
bug A confirmed bug report docs This issue is related to documentation package: daff.io @daffodil/daff.io
Milestone

Comments

@xelaint
Copy link
Member

xelaint commented Jan 30, 2024

🐛 Bug report

Current Behavior

Docs table of contents sidebar generates code as back tick marks. The styling of code blocks in heading tags also need to be updated.

  1. Should we be using code blocks in markdown headings?
  2. If we are going to, how do we fix this in doc gen?
Screen Shot 2024-01-30 at 8 55 14 AM

Expected Behavior

Docs TOC should not display the code block back tick marks.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Daffodil version: X.Y.Z
Angular version: X.Y.Z 

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@xelaint xelaint added bug A confirmed bug report docs This issue is related to documentation package: daff.io @daffodil/daff.io labels Jan 30, 2024
@xelaint xelaint added this to the Daffodil v1.0 milestone Jan 30, 2024
@xelaint
Copy link
Member Author

xelaint commented Feb 28, 2024

@damienwebdev @griest024 since you guys prefer to use code blocks in headings, how do we handle how it's rendered in the table of contents?

@damienwebdev
Copy link
Member

Angular has an example here: https://angular.io/tutorial/first-app#step-1---identify-the-version-of-nodejs-that-angular-requires with the word node.js interestingly, it's different on mobile versus desktop.

I don't mind this style: Screenshot_20240228-091346.png

@xelaint
Copy link
Member Author

xelaint commented Feb 28, 2024

@damienwebdev yea the styling is easy to update, but how do we get the code block to render as styled code blocks instead of what it currently looks like (screenshot shows back tick marks in the toc)?

@damienwebdev
Copy link
Member

damienwebdev commented Feb 28, 2024

We use https://github.com/jonschlinkert/markdown-toc to generate these here: https://github.com/graycoreio/daffodil/blob/develop/tools%2Fdgeni%2Fsrc%2Ftransforms%2Fdaffodil-guides-package%2Freader%2Fguide-file.reader.ts

We would have to play around with markdown-toc to see if we can make it escape this content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed bug report docs This issue is related to documentation package: daff.io @daffodil/daff.io
Projects
None yet
Development

No branches or pull requests

2 participants