When a try/except spans a hunk boundary and the opening keyword isn't included in the diff context, Shiki loses context and highlighting breaks for the visible lines. Root cause: highlighting is applied to hunk text only, not the full file.
Fix suggestion: fetch the full file via git show <sha>:<path>, highlight it with Shiki, then extract only the relevant line ranges