java-diff-utils / java-diff-utils

Diff Utils library is an OpenSource library for performing the comparison / diff operations between texts or some kind of data: computing diffs, applying patches, generating unified diffs or parsing them, generating diff output for easy future displaying (like side-by-side view) and so on.

Home Page:https://java-diff-utils.github.io/java-diff-utils/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hanging on generateDiffRows

markwoon opened this issue · comments

The code:

    List<String> original = Files.readAllLines(oldFile);
    List<String> revised = Files.readAllLines(file);

    DiffRowGenerator generator = DiffRowGenerator.create()
        .showInlineDiffs(true)
        .mergeOriginalRevised(true)
        .inlineDiffByWord(true)
        .oldTag(f -> f ? "<s style=\"background-color: #bbbbbb\">" : "</s>")
        .newTag(f -> f ? "<b style=\"background-color: #aaffaa\">" : "</b>")
        .build();

    List<DiffRow> rows = generator.generateDiffRows(original, revised);

The files: test.zip

generator.generateDiffRows is hanging for me with these 2 files.

System

  • Java version: 17
  • java-diff-utils version: 4.12

Stale issue message

Still hoping for a fix.