You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the markdown generator adds its own backticks to style the type as a "code" value, it should escape values that contain backticks. I think you should be able to use two backticks and a space around each side of the type to safely escape the inner backticks.
Editing the props and running npm run build should update the generated readme.
Other information:
I can probably workaround this by writing a Custom Docs Generator, but it seems like overkill to have to reimplement generation for events, methods, etc.
The text was updated successfully, but these errors were encountered:
Stencil version:
Current behavior:
When markdown docs are generated for a prop that is a Template Literal Type, e.g.
The markdown generator takes the type as-is without escaping the backticks, which has incorrect formatting (and breaks in an MDX parser)
width
width
${number}%` | `${number}px
undefined
Expected behavior:
Since the markdown generator adds its own backticks to style the type as a "code" value, it should escape values that contain backticks. I think you should be able to use two backticks and a space around each side of the type to safely escape the inner backticks.
width
width
`${number}%` | `${number}px`
undefined
GitHub Reproduction Link:
See the minimal reproduction repo here: https://github.com/brandongregoryscott/stencil-prop-escape-reproduction
Editing the props and running
npm run build
should update the generated readme.Other information:
I can probably workaround this by writing a Custom Docs Generator, but it seems like overkill to have to reimplement generation for events, methods, etc.
The text was updated successfully, but these errors were encountered: