Fix cursor position in bef and aft ruby snippets.