We merge a faux block with contents from after a split point when
inserting HTML. The merge function presumes this block has already had
fixCursor run on it to ensure we add the <br>s some browsers need to
support correct cursor focusing.
Fixes#451
The parent variable was introduced in the Typescript refactor to make
the type checker happy, however we missed assigning the result back to
the `node` variable at the end.
Fixes#449
The fixer node may get removed when merging adjacent inlines, so move
the cleanup to before this. For safety, also properly check for non-null
nodes so we don't crash if it's still elided for some reason.
This is a massive refactor to port Squire to TypeScript, fix a bunch of small
bugs and modernise our tooling. The development was done on an internal
repository, so apologies to anyone following externally for the commit dump;
updates from here should come as real commits again.
Co-authored-by: Joe Woods <woods@fastmailteam.com>