Skip to content

Failed to parse lines, starting in 0! #85

@LionelMarbot

Description

@LionelMarbot

Hi,

Our diffs are generated in PHP with https://github.com/sebastianbergmann/diff. Here is an example diff:

"--- Original\n+++ New\n@@ @@\n-This is test.\n-A multiline test.\n-With some minor differencs.\n+This is a test.\n+A multi-line test.\n+With some minor differences.\n","translator_comment":"This is a test.\r\nA multi-line test.\r\nWith some minor differences."

While Diff2HtmlUI does parse the diff and shows HTML, it always throws error Failed to parse lines, starting in 0!.

Longer diffs then look like this:

Wrong numbering

As you can see in the image, the numbering is wrong. Also, further lines without diffs are still being shown. In above example, after line 2, there are no more diffs. Still, the complete file (200 more lines) is being shown.

Any idea?

Best,
Lionel

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