You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
simonward
changed the title
-[NSAttributedString markdownRepresentation] doesn't handle overlapping italic and italic if they don't have the same range.
-[NSAttributedString markdownRepresentation] doesn't handle overlapping bold and italic if they don't have the same range.
May 11, 2020
I'm not sure the assertion for @"_Italic **Bold**_" is valid. The Markdown syntax documentation makes no mention of scoping being a requirement (nor does HTML). It's more visual than structural: <i>Italic <strong>Bold</i></strong> looks the same as <i>Italic <strong>Bold</strong></i>.
The order operations in emitMarkdown could be changed to make the first test pass, but then the second one fails. The underlying cause is that the rich text representation doesn't have a notion of one style wrapping another (to give scope). It seems like a hard problem to solve and considering the spec doesn't require this, it feels like more a "nice to have" than "this is broken".
I'm going to leave this issue open and think about it more. Thanks for the unit tests, in any case!
See attached unit tests.
NSAttributedString+Markdown_Tests.m.txt
The text was updated successfully, but these errors were encountered: