Open bhirt opened 5 years ago
Some clues as to what caused this in the conversation here, https://github.com/outline/outline/issues/443
I noticed that https://github.com/markedjs/marked handles my input correctly. It also seem to have more exhaustive rules than slate-md-serializer (but underscore is a new slate-md-serializer rule that cause problems). I am looking into this further. I did try updated the regex rules and captures to what marked is using, butit fails.
A quick debugging sessions shows that Renderer.prototype.strong and Renderer.prototype.em are both being called on my test input, but each time they create a new array of marks. My expected behavior would be the first call to create a marks array and the second call appends a mark to the existing one.
Is this something that would be committed if a sutable fix was found?
Is this something that would be committed if a sutable fix was found?
Absolutely, that would be great. The library also has extensive regression tests, I'd recommend a TDD approach to working with the lib – writing the failing test first.
It looks like support in deserializer seems to have a problem with markdown that should generate a leaf with multiple marks. This simple code demonstrates the issue.
outputs