본문 바로가기
개발

diff_match_patch를 이용한 파일 sync

by 고양이양말 2022. 8. 22.

string의 변경된 부분을 비교 해주는 google의 diff-match-patch library 사용(언어별로 제공)

https://github.com/google/diff-match-patch

 

시작은 eclipse의 svn team synchronize처럼 파일 비교를 하기 위해 diff_prettyHtml을 수정하였으나 스크롤 문제가 어려워서 Visual Studio Code의 파일 비교 처럼 수정된 영역을 꽂아넣어 text 높이를 맞추어 스크롤을 동일하게 수정하였다.

완벽하지는 않지만..