Ignore OL Lists #1244
-
Hi Community, I am using react-markdown in combination with Next.js and got a really exhausting problem. I got the following input which needs to be parsed through the renderer and contains Date information.
Unfortunately, these date inputs are interpreted as ordered lists but i want them to be ignored / or to say rendered as a normal text in e.g an "p" - tag. I already tried several things like setting "disallowedElements" to ["list"] and add unwrapDisallowed to "true", but that did not work for me. I also tried to write a override "component renderer" for the "ol" elements but the structure of the props is provided recursively down in children and it would not be a nice solution.. I found this similar question, but wasn´t quite able to get a solution based on that. Does anybody ever encountered a similar issue or has some tips how i could fix that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey! That is not markdown. We don’t want to support custom markdown flavors. So we really really really really really really do not recommend it. That being said, there is one way to turn off things. It’s in the underlying markdown parser. https://github.com/micromark/micromark#case-turn-off-constructs. Again. Not recommended. |
Beta Was this translation helpful? Give feedback.
Hey!
That is not markdown. We don’t want to support custom markdown flavors. So we really really really really really really do not recommend it.
That being said, there is one way to turn off things. It’s in the underlying markdown parser. https://github.com/micromark/micromark#case-turn-off-constructs. Again. Not recommended.