Neat idea, though as I was playing around with it I noticed right away that the following seems to be impossible (or else very non-obvious) via Aftertext:
"How much wood could a woodchuck chuck if a woodchuck could chuck wood?"
I tried
How much wood could a woodchuck chuck if a woodchuck could chuck wood?
italics wood
italics wood
which only seemed to italicize the first "wood", and How much wood could a woodchuck chuck if a woodchuck could chuck wood?
italics wood wood
which obviously failed because it can't find the substring "wood wood". And of course neither of these would match the "wood" in either of the "woodchuck" instances, so no italicization there, either.