Skip to content

Syntax highlighting breaks for multi-line Python constructs in partial diffs #29

@Avein

Description

@Avein

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions