bem / bem/html-differ

Self-closing elements should be equivalent

Open
#135 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
217
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Currently optionally self-closing elements such as images and line breaks are not considered equivalent. E.G.

``` js
const differ = require('html-differ')

let lhs = '


'
let rhs = '

'

let diff = differ.diffHtml(lhs, rhs)

console.log(diff)

// [
// {
// "value": "

"
// }
// ]
```

For reference Parse5 and htmlparser2 interpret both strings equally. I'm looking into this to see if I can help.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.