diff2html
Advanced tools
Comparing version 3.4.12 to 3.4.13
@@ -1,5 +0,9 @@ | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -17,3 +21,3 @@ import { LineType } from './types'; | ||
function getFilename(line, linePrefix, extraPrefix) { | ||
var prefixes = extraPrefix !== undefined ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes), [extraPrefix]) : baseDiffFilenamePrefixes; | ||
var prefixes = extraPrefix !== undefined ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes; | ||
var FilenameRegExp = linePrefix | ||
@@ -20,0 +24,0 @@ ? new RegExp("^" + escapeForRegExp(linePrefix) + " \"?(.+?)\"?$") |
"use strict"; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -20,5 +24,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function getFilename(line, linePrefix, extraPrefix) { | ||
var prefixes = extraPrefix !== undefined ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes), [extraPrefix]) : baseDiffFilenamePrefixes; | ||
var prefixes = extraPrefix !== undefined ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes; | ||
var FilenameRegExp = linePrefix | ||
? new RegExp("^" + utils_1.escapeForRegExp(linePrefix) + " \"?(.+?)\"?$") | ||
? new RegExp("^" + (0, utils_1.escapeForRegExp)(linePrefix) + " \"?(.+?)\"?$") | ||
: new RegExp('^"?(.+?)"?$'); | ||
@@ -25,0 +29,0 @@ var _a = FilenameRegExp.exec(line) || [], _b = _a[1], filename = _b === void 0 ? '' : _b; |
@@ -99,4 +99,4 @@ "use strict"; | ||
function filenameDiff(file) { | ||
var oldFilename = utils_1.unifyPath(file.oldName); | ||
var newFilename = utils_1.unifyPath(file.newName); | ||
var oldFilename = (0, utils_1.unifyPath)(file.oldName); | ||
var newFilename = (0, utils_1.unifyPath)(file.newName); | ||
if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) { | ||
@@ -155,3 +155,3 @@ var prefixPaths = []; | ||
function getHtmlId(file) { | ||
return "d2h-" + utils_1.hashCode(filenameDiff(file)).toString().slice(-6); | ||
return "d2h-" + (0, utils_1.hashCode)(filenameDiff(file)).toString().slice(-6); | ||
} | ||
@@ -158,0 +158,0 @@ exports.getHtmlId = getHtmlId; |
@@ -24,3 +24,3 @@ "use strict"; | ||
this.config = __assign(__assign({}, exports.defaultDiff2HtmlUIConfig), config); | ||
this.diffHtml = diffInput !== undefined ? diff2html_1.html(diffInput, this.config) : target.innerHTML; | ||
this.diffHtml = diffInput !== undefined ? (0, diff2html_1.html)(diffInput, this.config) : target.innerHTML; | ||
this.targetElement = target; | ||
@@ -121,3 +121,3 @@ if (hljs !== undefined) | ||
var language = file.getAttribute('data-lang'); | ||
var hljsLanguage = language ? highlight_js_helpers_1.getLanguage(language) : 'plaintext'; | ||
var hljsLanguage = language ? (0, highlight_js_helpers_1.getLanguage)(language) : 'plaintext'; | ||
var codeLines = file.querySelectorAll('.d2h-code-line-ctn'); | ||
@@ -131,11 +131,11 @@ codeLines.forEach(function (line) { | ||
return; | ||
var result = highlight_js_helpers_1.closeTags(_this.hljs.highlight(text, { | ||
var result = (0, highlight_js_helpers_1.closeTags)(_this.hljs.highlight(text, { | ||
language: hljsLanguage, | ||
ignoreIllegals: true, | ||
})); | ||
var originalStream = highlight_js_helpers_1.nodeStream(line); | ||
var originalStream = (0, highlight_js_helpers_1.nodeStream)(line); | ||
if (originalStream.length) { | ||
var resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); | ||
resultNode.innerHTML = result.value; | ||
result.value = highlight_js_helpers_1.mergeStreams(originalStream, highlight_js_helpers_1.nodeStream(resultNode), text); | ||
result.value = (0, highlight_js_helpers_1.mergeStreams)(originalStream, (0, highlight_js_helpers_1.nodeStream)(resultNode), text); | ||
} | ||
@@ -142,0 +142,0 @@ line.classList.add('hljs'); |
{ | ||
"name": "diff2html", | ||
"version": "3.4.12", | ||
"version": "3.4.13", | ||
"homepage": "https://diff2html.xyz", | ||
@@ -88,3 +88,3 @@ "description": "Fast Diff to colorized HTML", | ||
"optionalDependencies": { | ||
"highlight.js": "11.1.0" | ||
"highlight.js": "11.2.0" | ||
}, | ||
@@ -95,50 +95,50 @@ "devDependencies": { | ||
"@types/hogan.js": "3.0.1", | ||
"@types/jest": "26.0.24", | ||
"@types/mini-css-extract-plugin": "^2.0.1", | ||
"@types/jest": "27.0.2", | ||
"@types/mini-css-extract-plugin": "^2.3.0", | ||
"@types/mkdirp": "1.0.2", | ||
"@types/node": "16.4.1", | ||
"@types/node": "16.11.0", | ||
"@types/nopt": "3.0.29", | ||
"@typescript-eslint/eslint-plugin": "4.28.4", | ||
"@typescript-eslint/parser": "4.28.4", | ||
"autoprefixer": "10.3.1", | ||
"@typescript-eslint/eslint-plugin": "5.0.0", | ||
"@typescript-eslint/parser": "5.0.0", | ||
"autoprefixer": "10.3.7", | ||
"bulma": "^0.9.2", | ||
"clipboard": "2.0.8", | ||
"copy-webpack-plugin": "9.0.1", | ||
"css-loader": "6.2.0", | ||
"cssnano": "5.0.7", | ||
"eslint": "7.31.0", | ||
"css-loader": "6.4.0", | ||
"cssnano": "5.0.8", | ||
"eslint": "8.0.1", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-import": "2.23.4", | ||
"eslint-plugin-jest": "24.4.0", | ||
"eslint-plugin-json": "3.0.0", | ||
"eslint-plugin-import": "2.25.2", | ||
"eslint-plugin-jest": "25.2.1", | ||
"eslint-plugin-json": "3.1.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-optimize-regex": "1.2.0", | ||
"eslint-plugin-optimize-regex": "1.2.1", | ||
"eslint-plugin-promise": "5.1.0", | ||
"eslint-plugin-sonarjs": "0.9.1", | ||
"eslint-plugin-sonarjs": "0.10.0", | ||
"file-loader": "6.2.0", | ||
"handlebars": "4.7.7", | ||
"handlebars-loader": "1.7.1", | ||
"html-webpack-plugin": "5.3.2", | ||
"husky": "^7.0.1", | ||
"image-webpack-loader": "7.0.1", | ||
"html-webpack-plugin": "5.4.0", | ||
"husky": "^7.0.2", | ||
"image-webpack-loader": "8.0.1", | ||
"is-ci-cli": "2.2.0", | ||
"jest": "27.0.6", | ||
"lint-staged": "11.1.0", | ||
"jest": "27.2.5", | ||
"lint-staged": "11.2.3", | ||
"markdown-toc": "^1.2.0", | ||
"mini-css-extract-plugin": "2.1.0", | ||
"mini-css-extract-plugin": "2.4.2", | ||
"mkdirp": "1.0.4", | ||
"nopt": "5.0.0", | ||
"postcss": "8.3.6", | ||
"postcss-cli": "8.3.1", | ||
"postcss": "8.3.9", | ||
"postcss-cli": "9.0.1", | ||
"postcss-import": "14.0.2", | ||
"postcss-loader": "6.1.1", | ||
"postcss-loader": "6.2.0", | ||
"postcss-preset-env": "6.7.0", | ||
"prettier": "2.3.2", | ||
"ts-jest": "27.0.4", | ||
"ts-loader": "9.2.3", | ||
"ts-node": "10.1.0", | ||
"typescript": "4.3.5", | ||
"prettier": "2.4.1", | ||
"ts-jest": "27.0.6", | ||
"ts-loader": "9.2.6", | ||
"ts-node": "10.3.0", | ||
"typescript": "4.4.4", | ||
"url-loader": "4.1.1", | ||
"webpack": "5.46.0", | ||
"webpack-cli": "4.7.2", | ||
"webpack": "5.58.2", | ||
"webpack-cli": "4.9.0", | ||
"whatwg-fetch": "3.6.2" | ||
@@ -145,0 +145,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1862224
5275