Change the way we swap documents in and out of the textview - this works nicely and is much simpler than the old version but it still doesn't completely fix the find bar bug.
Non-atomic accessors for speed, and cache the attributed string since this doesn't really change.
Override hash: so we can properly put bib items in a set.
Now we just assign the text storage to the layout manager. Also some optimisation regarding colouring the whole document. It's not necessary and can be expensive.
Collect bib items in a set because it's a lot faster.
use isequal: rather than like: because it's faster. Not sure why we were using like:.
Some optimisation. Cache the newline character set outside the loop.
This should be a better regexp for placeholders.
Updated the tests. This leaves some edge cases but very rare ones.
version 2.2.7