Correctly move into the markup when inserting a substitution or a comment.