Enable line matching on side-by-side sample

This commit is contained in:
Rodrigo Fernandes 2015-12-19 22:54:03 +00:00
parent 1dce15ad7a
commit ff8eca3a7b

View file

@ -246,7 +246,7 @@
// generate and inject the diff HTML into the desired place // generate and inject the diff HTML into the desired place
document.getElementById("line-by-line").innerHTML = Diff2Html.getPrettyHtml(diffJson, { inputFormat: 'json', showFiles: true, matching: 'lines' }); document.getElementById("line-by-line").innerHTML = Diff2Html.getPrettyHtml(diffJson, { inputFormat: 'json', showFiles: true, matching: 'lines' });
document.getElementById("side-by-side").innerHTML = Diff2Html.getPrettyHtml(diffJson, { inputFormat: 'json', outputFormat: 'side-by-side' }); document.getElementById("side-by-side").innerHTML = Diff2Html.getPrettyHtml(diffJson, { inputFormat: 'json', showFiles: true, matching: 'lines', outputFormat: 'side-by-side' });
// collect all the code lines and execute the highlight on them // collect all the code lines and execute the highlight on them
var codeLines = document.getElementsByClassName("d2h-code-line-ctn"); var codeLines = document.getElementsByClassName("d2h-code-line-ctn");