我正在使用diff2html在 HTML 页面中显示 git PR 中的差异。我已经添加了必要的脚本并像这样调用对象
<script type="text/javascript">
var diffHtml = Diff2Html.getPrettyHtml(
'https://github.com/rtfpessoa/diff2html/pull/106',
{
inputFormat: 'diff',
showFiles: true,
matching: 'lines',
outputFormat: 'side-by-side'
}
);
document.getElementById("diff-container").innerHTML = diffHtml;
</script>
现在这显示Files changed (0)。我给出的 URL 是在他们网站的演示部分给出的,并且有差异。我这样做正确吗?或者我如何从 URL 中获取?