Declarative Text Kit: Token-Based Adapters
I’ve now finished adding an example adapter to get a structural representation of a Markdown code block to my app. It bridges the abstract syntax tree (or “token tree”) of libMultiMarkdown
to NSTextStorage
-compatible UTF-16 substring ranges – which DeclarativeTextKit
works with, reducing code size and potential for errors even further: