Skip to content

Fix HTML diff line numbering when blank lines are stripped #20

@drogers0

Description

@drogers0

Summary

HTML diff line numbers become inaccurate when blank lines are removed before rendering.

Affected code

  • src/clonehunter/reporting/html_reporter.py:180
  • src/clonehunter/reporting/html_reporter.py:268

Problem

_strip_blank_lines() removes empty lines from compare text, but displayed line numbers still increment from original start_line.
This shifts line mapping and can mislead users when navigating source.

Expected

Preserve original line positions in rendered diff (or avoid stripping blanks before numbering).

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