Implementing diff in doc conversion