Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed HTML output #2

Open
ddohler opened this issue Jan 6, 2013 · 0 comments
Open

Malformed HTML output #2

ddohler opened this issue Jan 6, 2013 · 0 comments

Comments

@ddohler
Copy link
Contributor

ddohler commented Jan 6, 2013

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>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant