Closed scfrazer closed 10 months ago
Weird, are you sure the plugin is using the latest diff2html
version?
Some versions ago I did some improvements in this area.
Also now you can even provide overrides for languages like this https://github.com/rtfpessoa/diff2html/blob/41a901694dc1f7a89de595555a6cd718cbf7e117/README.md?plain=1#L387
I think you need to ask for support from the plugin dev not much I can do here as it does not seem like a problem.
If you really think it is a diff2html problem, feel free to re-open but provide some extra details.
Thanks for the update, I'll see if I can debug the issue more, maybe use the suggestion you gave above for highlightLanguages
. I'll re-open if there seems like something is generic enough to perhaps be in this code instead.
Hey, @rtfpessoa I think this issue should be re-opened. I just submitted a PR with a simple change to avoid causing problems in libraries that use the slim version of diff2html. I am new to the GitHub PR process so hopefully I've done everything correctly.
BTW I originally tried going down the route you suggested using highlightLanguages
. I can't remember the details off the top of my head, but there was an issue that the subclass that has the highlightLanguages
member wasn't exported so it was not externally usable. I'm not an expert so maybe I messed up, but FYI there may be an issue there as well.
Published v3.4.41 with the fix
Step 0: Describe your environment
Step 1: Describe the problem:
I'm an indirect user of diff2html. I use the VSCode extension vscode-diff-viewer, which uses diff2html to show diffs inside VSCode. It is using the 'slim' version. When I have a diff for a file type not supported by the slim version (Django in my case, mapped from Jinja files), an error happens and nothing is produced. I'm sorry I can't be more specific, as I said I am in indirect user and have followed error messages and layers of code around the best I can. Here is a screenshot of the error in the VSCode developer tools console:
I hope this is enough for you to figure out where the issue is. If not I will attempt to get you more information.
diff example:
Observed Results:
Expected Results: