Release version 2.3.0
This commit is contained in:
parent
f31edcacba
commit
ffb5d524a6
10 changed files with 24 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "diff2html",
|
"name": "diff2html",
|
||||||
"version": "2.0.12",
|
"version": "2.3.0",
|
||||||
"homepage": "https://diff2html.xyz",
|
"homepage": "https://diff2html.xyz",
|
||||||
"description": "Fast Diff to colorized HTML",
|
"description": "Fast Diff to colorized HTML",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
||||||
2
dist/diff2html.css
vendored
2
dist/diff2html.css
vendored
File diff suppressed because one or more lines are too long
7
dist/diff2html.js
vendored
7
dist/diff2html.js
vendored
|
|
@ -3262,7 +3262,7 @@ process.umask = function() { return 0; };
|
||||||
LineByLinePrinter.prototype.makeColumnLineNumberHtml = function(block) {
|
LineByLinePrinter.prototype.makeColumnLineNumberHtml = function(block) {
|
||||||
return hoganUtils.render(genericTemplatesPath, 'column-line-number', {
|
return hoganUtils.render(genericTemplatesPath, 'column-line-number', {
|
||||||
diffParser: diffParser,
|
diffParser: diffParser,
|
||||||
blockHeader: block.header,
|
blockHeader: utils.escape(block.header),
|
||||||
lineClass: 'd2h-code-linenumber',
|
lineClass: 'd2h-code-linenumber',
|
||||||
contentClass: 'd2h-code-line'
|
contentClass: 'd2h-code-line'
|
||||||
});
|
});
|
||||||
|
|
@ -3866,7 +3866,7 @@ process.umask = function() { return 0; };
|
||||||
SideBySidePrinter.prototype.makeSideHtml = function(blockHeader) {
|
SideBySidePrinter.prototype.makeSideHtml = function(blockHeader) {
|
||||||
return hoganUtils.render(genericTemplatesPath, 'column-line-number', {
|
return hoganUtils.render(genericTemplatesPath, 'column-line-number', {
|
||||||
diffParser: diffParser,
|
diffParser: diffParser,
|
||||||
blockHeader: blockHeader,
|
blockHeader: utils.escape(blockHeader),
|
||||||
lineClass: 'd2h-code-side-linenumber',
|
lineClass: 'd2h-code-side-linenumber',
|
||||||
contentClass: 'd2h-code-side-line'
|
contentClass: 'd2h-code-side-line'
|
||||||
});
|
});
|
||||||
|
|
@ -4096,6 +4096,9 @@ module.exports = global.browserTemplates;
|
||||||
.replace(/&/g, '&')
|
.replace(/&/g, '&')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/\//g, '/')
|
||||||
.replace(/\t/g, ' ');
|
.replace(/\t/g, ' ');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
2
dist/diff2html.min.css
vendored
2
dist/diff2html.min.css
vendored
File diff suppressed because one or more lines are too long
4
dist/diff2html.min.js
vendored
4
dist/diff2html.min.js
vendored
File diff suppressed because one or more lines are too long
13
docs/demo.js
13
docs/demo.js
|
|
@ -85,7 +85,10 @@
|
||||||
headers.forEach(function(value, name) {
|
headers.forEach(function(value, name) {
|
||||||
this.append(name, value)
|
this.append(name, value)
|
||||||
}, this)
|
}, this)
|
||||||
|
} else if (Array.isArray(headers)) {
|
||||||
|
headers.forEach(function(header) {
|
||||||
|
this.append(header[0], header[1])
|
||||||
|
}, this)
|
||||||
} else if (headers) {
|
} else if (headers) {
|
||||||
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
||||||
this.append(name, headers[name])
|
this.append(name, headers[name])
|
||||||
|
|
@ -304,9 +307,7 @@
|
||||||
options = options || {}
|
options = options || {}
|
||||||
var body = options.body
|
var body = options.body
|
||||||
|
|
||||||
if (typeof input === 'string') {
|
if (input instanceof Request) {
|
||||||
this.url = input
|
|
||||||
} else {
|
|
||||||
if (input.bodyUsed) {
|
if (input.bodyUsed) {
|
||||||
throw new TypeError('Already read')
|
throw new TypeError('Already read')
|
||||||
}
|
}
|
||||||
|
|
@ -321,6 +322,8 @@
|
||||||
body = input._bodyInit
|
body = input._bodyInit
|
||||||
input.bodyUsed = true
|
input.bodyUsed = true
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.url = String(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.credentials = options.credentials || this.credentials || 'omit'
|
this.credentials = options.credentials || this.credentials || 'omit'
|
||||||
|
|
@ -356,7 +359,7 @@
|
||||||
|
|
||||||
function parseHeaders(rawHeaders) {
|
function parseHeaders(rawHeaders) {
|
||||||
var headers = new Headers()
|
var headers = new Headers()
|
||||||
rawHeaders.split('\r\n').forEach(function(line) {
|
rawHeaders.split(/\r?\n/).forEach(function(line) {
|
||||||
var parts = line.split(':')
|
var parts = line.split(':')
|
||||||
var key = parts.shift().trim()
|
var key = parts.shift().trim()
|
||||||
if (key) {
|
if (key) {
|
||||||
|
|
|
||||||
2
docs/demo.min.js
vendored
2
docs/demo.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
docs/main.min.css
vendored
2
docs/main.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "diff2html",
|
"name": "diff2html",
|
||||||
"version": "2.0.12",
|
"version": "2.3.0",
|
||||||
"homepage": "https://diff2html.xyz",
|
"homepage": "https://diff2html.xyz",
|
||||||
"description": "Fast Diff to colorized HTML",
|
"description": "Fast Diff to colorized HTML",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue