/oss · 3 merged

rtfpessoa/diff2html

A JavaScript library that turns code diffs into readable, colour-highlighted web pages.

the project on GitHub (opens in a new tab)
  1. 28 Nov 2026

    Patch files show no fake deleted line

    What was broken
    Every patch made by git format-patch, or downloaded from GitHub, showed a made-up deleted line at the end of its last file.
    What I changed
    The reader now stops at the line counts the patch gives.
    Why it matters
    Patch files display exactly the changes they contain.

    see the code, #607 (opens in a new tab)

  2. 27 Nov 2026

    Non-English file names show properly

    What was broken
    Git writes names with accents or other non-English letters as coded number sequences. diff2html showed those codes, like /303/274, instead of the real name.
    What I changed
    Those quoted names are now decoded back into the real characters.
    Why it matters
    Files named in any language appear with their real names.

    see the code, #601 (opens in a new tab)

  3. 27 Nov 2026

    File names with spaces keep their highlighting

    What was broken
    For files with a space in the path, git adds an invisible tab after the name. diff2html kept it, so the file type was lost and code was not highlighted.
    What I changed
    That trailing tab is now dropped from file names.
    Why it matters
    Diffs of files in folders like "My Docs" show clean names and proper colours.

    see the code, #600 (opens in a new tab)

← every project