Updates only selected text

Separated the walker function into a separate function that only transforms the selected sections of the first and last text nodes.