4 ms·
Since hyperlinks can link to any document, not just children, shouldn't the data structure be a (not necessarily tree-shaped) directed graph?
by TheAsprngHacker 7y ago
Since hyperlinks can link to any document, not just children, shouldn't the data structure be a (not necessarily tree-shaped) directed graph?
- carapace 7y agoI 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.System.pdf http://www.inf.ethz.ch/personal/wirth/ProjectOberon/PO.Syste... section 5.2, "Text Management".
- layoutIfNeeded 7y agoThe 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/nsattributedstring https://developer.apple.com/documentation/foundation/nsattri...