Skip to content

Commit fa348e5

Browse files
committed
Merge branch 'release/v1.7.2'
2 parents 18891d3 + e0f2686 commit fa348e5

3 files changed

Lines changed: 426 additions & 544 deletions

File tree

lib/render.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ function render(file, enc, cb) {
6363

6464
// Finally, add the page as a partial called "body", and render the layout template
6565
this.Handlebars.registerPartial('body', pageTemplate);
66-
file.contents = new Buffer(layoutTemplate(pageData));
66+
file.contents = new Buffer.from(layoutTemplate(pageData));
6767
}
6868
catch (e) {
6969
if (layoutTemplate) {
7070
// Layout was parsed properly so we can insert the error message into the body of the layout
7171
this.Handlebars.registerPartial('body', 'Panini: template could not be parsed <br> \n <pre>{{error}}</pre>');
72-
file.contents = new Buffer(layoutTemplate({ error: e }));
72+
file.contents = new Buffer.from(layoutTemplate({ error: e }));
7373
}
7474
else {
7575
// Not even once - write error directly into the HTML output so the user gets an error
7676
// Maintain basic html structure to allow Livereloading scripts to be injected properly
77-
file.contents = new Buffer('<!DOCTYPE html><html><head><title>Panini error</title></head><body><pre>'+e+'</pre></body></html>');
77+
file.contents = new Buffer.from('<!DOCTYPE html><html><head><title>Panini error</title></head><body><pre>'+e+'</pre></body></html>');
7878
}
7979

8080
throw new Error('Panini: rendering error occured.\n' + e);

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "panini",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "A super tiny flat file compiler.",
55
"main": "index.js",
66
"scripts": {
@@ -18,7 +18,7 @@
1818
"handlebars": "^4.0.5",
1919
"highlight.js": "^8.9.1",
2020
"js-yaml": "^3.14.0",
21-
"marked": "^1.1.1",
21+
"marked": "^2",
2222
"nopt": "^4.0.1",
2323
"slash": "^1.0.0",
2424
"strip-bom": "2.0.0",
@@ -35,6 +35,10 @@
3535
"mocha": "^8.0.1",
3636
"mocha-lcov-reporter": "^1.3.0"
3737
},
38+
"resolutions": {
39+
"glob-parent": "^5.1.2",
40+
"yargs-parser": "^20.2.4"
41+
},
3842
"repository": {
3943
"type": "git",
4044
"url": "https://github.com/foundation/panini"

0 commit comments

Comments
 (0)