mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-17 11:07:11 +08:00
The fuzzy fallback anchored every line with a leading [ \t]* that greedily consumed the file's indentation into the matched region, so a no-indent oldText dropped the edited line's indentation. Fold leading whitespace into the match only when oldText was itself indented on the first line, mirroring exact-substring semantics. Add a regression test.