Rewrite of text substitution side, WIP
Rewrite of text substitution side, WIP

Catch up text substitution side with FSM search data structures changes.
Currently it doesn't quite work yet, but the overall layout seems sound.

rtfb/yunosi,rtfb/yunosi