Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can't even decide whether the text (e.g. in a div or p element) should be stored as a unit with links stored as meta-data, or should the stretches of text before/after/between links be "chunks" and the links store their own content (like DOM)?

It's an old question, see the "piece-chain" structure Prof With chose for text-with-"looks" (aka "style") http://www.inf.ethz.ch/personal/wirth/ProjectOberon/PO.Syste... section 5.2, "Text Management".



The former is how NSAttributedString works in the Apple ecosystem. It’s a plain string with attributes attached to certain character ranges.

https://developer.apple.com/documentation/foundation/nsattri...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: