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
It would help us immensely to be able to convert HTML to a String+Points and back. This would enable us to perform Sememe link interpolation and text range formatting in a platform-independent way, i.e. it can become both HTML and an NSAttributedString (and also whatever it is Android uses, which is apparently equivalent).
Essentially, we want:
<ul><li><ahref="/squirrels">Squirrels</a></li><li>…and other things.</li></ul>
Block-level HTML nodes should be applied first, since these should not begin or end any differently than from when they were derived.
Sememe matches and links should be applied next since if they point to the same resource they should remain intact except if they cross between block-level nodes.
Formatting can be applied last, since it's okay to break these up.
This means that we should resolve any links with Sememe matches in advance. If a Sememe match overlaps with a link, we'll probably want to drop the link unless the same match has already occurred earlier in the string.
It would help us immensely to be able to convert HTML to a String+Points and back. This would enable us to perform Sememe link interpolation and text range formatting in a platform-independent way, i.e. it can become both HTML and an
NSAttributedString
(and also whatever it is Android uses, which is apparently equivalent).Essentially, we want:
to become:
…and back again, i.e. stacking order is preserved.
The text was updated successfully, but these errors were encountered: