Open i-like-robots opened 8 years ago
Currently optionally self-closing elements such as images and line breaks are not considered equivalent. E.G.
const differ = require('html-differ') let lhs = '<div><br></div>' let rhs = '<div><br /></div>' let diff = differ.diffHtml(lhs, rhs) console.log(diff) // [ // { // "value": "<div><br" // }, // { // "value": "/", // "added": true // }, // { // "value": "></div>" // } // ]
For reference Parse5 and htmlparser2 interpret both strings equally. I'm looking into this to see if I can help.
Currently optionally self-closing elements such as images and line breaks are not considered equivalent. E.G.
For reference Parse5 and htmlparser2 interpret both strings equally. I'm looking into this to see if I can help.