Skip to content

Malformed HTML output #2

@ddohler

Description

@ddohler

Due to the way difflib.SequenceMatcher selects the longest match, ins tags may sometimes be placed in ways that result in malformed HTML. Example below.

>>> a = "<p>a</p><p>This is a test.</p>"
>>> b = "<p>a</p><p>b</p><p>This is a test.</p>"
>>> diff.textDiff(a,b)
'<p>a<ins class="diff"></p><p>b</ins></p><p>This is a test.</p>'

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