fix line num calculation, escape symbols in diff, update basis version