Repository: vscode
Issue: Improve Diff: Don't match unrelated text
Labels: feature-request,diff-editor



[example](https://microsoft.github.io/monaco-editor/playground.html?source=v0.39.0#XQAAAAIMTwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3ysczwc8aoFYgwnVP_i32Tvg7CoQ-F2f1REWC7PBN90IlpLvcflp2pp5-9Ef9ly7AC2fyF0LqLrPU1LlfRxN4mzDoPOtmoAZBIMwUApXP9vWg5rv8cBSZvD_CtH1OEKbGdQ7bG9FHjxeWcmMQA8XNqhoPLt9QlCLrhd88dsa2K7l65H6SpYEDeq1vdEZOz0M4LoD14Cmj8Fez_TH2LN85PoS3OPh-NwmOY6RNQ3lbc-I2x6DTwbJV8CrHrAnmBBlrOkDnXJxD6_wmXSQ-2YFY8UY46PDuVsi_wT5w4RDkyelprUtNcHk6I-0nD5MxQIvTu3TsHpH6hz52tlqtajfS_Mz8F_A3GejkuheEOnaVfiby2_vuah_nfGFRvFvBUVvofP73AUyL-2RsgpTiygsHX08IRd-ad6c7g-PB3IjpbQ6gXNqSmb_8r7j3nDeRz1FhB_nTQZWYLazVNs-aH0ihSsnFcaet2i7MUmE519LipfCl2OxBPtipBJMtVCqY7URjJwDQCCDcEYrsRIHkgCMSpyvUhCv6ooaoO2JcWJf3np1Lpq5WHlNsMc-oSDm2FJAp-o5yPWWLccyopCTf1N2su2lEAIZva-XOK76b4WJ9cTC1HqgWuxnmdpWdTgi49_7ub9DbpfUgZUz9qKwRXmLLl_M16ihyZgyj15mkuokfyp5Wl1rEmloYTat7yfKRSxy1AF86Vt4Xx5ZHh8npGL90UR9HIVzeS_KrdJVE_wd6ewWjtjnIyBF_E0ZOQhMUa_Glwc7aXaYh-gRLgSglQqZkAOTUACbtK_ti8xYP-opBUeS9C_9WcJOGxttQc5Jd0N8IDoPB8C9JOheeKKbDw64DvzsGC50wynMrC07mT6Vtb3gU9PHl2WD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