Open haldun opened 3 years ago
@haldun Hmm. Any ideas? Without that assertion, TextKit will access things out of bounds.
Do you think we should just disable the assertion and return instead?
TBH I didn't dig deeper to these issues yet, so I think it would be better to understand why the assertion fails for these inputs at the first place.
I ran into something similar in the past. It was a bug in cmark. Had to make a make some small changes to it to get it to work reliably. Maybe start with adding these strings in tests and asserting where you think the ranges should be then work backwards from there.
I don't have time today to look at this. I can try to help later this week though if you can't figure it out!
Oh this is not urgent at all! I just wanted to document these edge cases.
The following inputs create an assertion failure at https://github.com/soffes/MarkdownKit/blob/769ec26ac46fe9cd249c1fd6133b225102efa7ed/Sources/MarkdownKitObjC/BaseTextStorage.m#L27