Questions tagged [diff2html]
9 questions
9
votes
1 answer
Run jQuery plugin diff2html inside an Angular directive with noconflict
I'm trying to format a diff inside an Angular directive using diff2html and var jq = $.noConflict();
I've created an Angular constant to hold jQuery and am passing it into the directive as so:
app.js
(function () { //IIFE to enable strict mode
…

Dan
- 11,914
- 14
- 49
- 112
4
votes
1 answer
Create unified diff text for diff2html in browser
Is there a library that produces unified diff from two strings that diff2html can use? I've tried difflib but the output does not seem to fit the requirements that diff2html needs. I need a .js library I can import in the webpage to produce diffs…

supercalifragilistichespirali
- 1,179
- 1
- 16
- 32
4
votes
0 answers
Can diff_match_patch create unified diff string for diff2html?
Can diff_match_patch be used to create a unified diff string that can be used in diff2html?

MaxP
- 325
- 2
- 14
1
vote
1 answer
I am getting ERROR in ./node_modules/diff2html/src/hoganjs-utils.js in angular6 cli app
I included the diff2html npm package to my angular6 project and when I compile it I get:
ERROR in ./node_modules/diff2html/src/hoganjs-utils.js
Module not found: Error: Can't resolve 'path' in
'C:\codes\XXX\node_modules\diff2html\src'
Any idea…

jani_r
- 637
- 1
- 7
- 18
0
votes
0 answers
Handling dynamic Routes with Diff2Html from its file list in Angular
I am using Diff2Html-UI it with Angular 13 and I am struggling with the links (href) in the file list. Since they have by default this form:
somefile.xml
As one can see in the code (github link)…

user3084813
- 1
- 3
0
votes
2 answers
React js diff2html Cannot read property 'getJsonFromDiff' of undefined
Link: codesandbox
I'm having the following problem can anyone help me out?
Error:
Cannot read property 'getJsonFromDiff' of undefined
-> let outStr = Diff2Html.getJsonFromDiff(dd, {
CodeDiff.js:
import React, { Component } from "react";
import…

Paul
- 3,644
- 9
- 47
- 113
0
votes
2 answers
Diff2html diff not loading
I am using diff2html to show the diffs in a git PR in an HTML page. I have added the necessary scripts and is calling the object like this