-
Hi, I'm using react-markdown alongside react-pdf to dynamically build PDFs with markdown. I use the components props to map the converted components to specific react-pdf components, to render the pdf. This approach has been working well, however, I am having difficulty when it comes to ordered lists, specifically, knowing the index of a specific list item. In the old documentation, it was mentioned that extra props are passed to ul, ol, li, and components, however, checking the changelogs, it was removed a few updates ago. I was wondering if there is a way to access these values. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
See the changelog you found. Next to what you read, is likely a migration tip. |
Beta Was this translation helpful? Give feedback.
You duplicate walking. That means that for lists in lists, as in list items in list items, you will have problems.
Lists have exactly only list items as children. List items have exactly only a list as a parent. This fact makes things simpler.
Also: I recommend using the common HTML data attribute name pattern.
Say for example: