Changing it to the following lets it pass the test:
# Welcome to React Markdown Previewer!
## Fun with React!
In trying to solve this, I added plain h1s and h2s below those top headers and it still didn’t pass the test. I guess the “clean” h1 and h2 have to be the first h1 and h2 in the text.
I looked at the test and any markdown syntax that will transform into HTML tags will make the test fail. E.g. you can’t bold some text in the header etc. I might make a PR if I can find a good solution, right now I’m not so sure what I have is that great.
The renderer overwrite needs to use the text raw param.
We need to convert the HTML back into markdown (e.g. using turndown) before doing the compare.
@lasjorg Thanks for your work! Using the markdown that didn’t work from my previous comment and your version of the test script gave the same failure.
I don’t think this is a major problem and doesn’t seem to affect many people. When I searched for previous forum topics about this problem, it seemed people solved it but it wasn’t clear how they solved it. So, hopefully this forum topic will be helpful for the few that do run into this problem.
It’s strange the little I tested it, it seem to work with links and making text bold in the header using the example project running locally. I might look into it some more at some point but as you said it isn’t that big of a deal.