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
Cannot use lib locally, SyntaxError: Invalid regular expression: range out of order in character class #380
Comments
Cannot replicate.
|
Ahh, I see what you meant and I just replicated it. But I have no idea why. |
@kintarowins, after some investigation, it was a charset issue. <!DOCTYPE html>
<html>
<head>
<title>Report</title>
<link rel="stylesheet" type="text/css" charset="utf-8" href="./diff2html.min.css" />
<script type="text/javascript" charset="utf-8" src="./diff2html-ui.min.js"></script>
</head>
<body>
<script>
document.addEventListener('DOMContentLoaded', () => {
let targetElement = document.getElementById("drawHere");
let configuration = { outputFormat: 'side-by-side', drawFileList: true, matching: 'lines' };
let diffString = JSON.parse(document.getElementById("the_diff").innerText);
let diff2htmlUi = new Diff2HtmlUI(targetElement, diffString, configuration);
diff2htmlUi.draw();
})
</script>
<div id="drawHere"></div>
<div style="display:none" id="the_diff">"diff --git a/Dockerfile b/Dockerfile\nindex a68f578..42c99ec 100644\n--- a/Dockerfile\n+++ b/Dockerfile\n@@ -1,4 +1,4 @@\n-FROM docker.myorg.com/gala:3.4.6\n+FROM docker.myorg.com/gala:3.4.7\n \n COPY datatools/.out/libs/datatools*.jar /data/box/datatools/\n COPY datatools/.dist/lib/solr-configs*.jar /data/box/solr-configs/"</div>
</body>
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 0: Describe your environment
Step 1: Describe the problem:
When using the CDN link for diff2html-ui.min.js, it works, but when used locally, it fails with
Steps to reproduce:
Observed Results:
Encountered the error above and any further rendering does not work
Expected Results:
no error
The text was updated successfully, but these errors were encountered: