Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit fa0eb39

Browse files
committed
Formatted code.
1 parent 9bda67d commit fa0eb39

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

helpers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
const Handlebars = require('handlebars');
22

3-
Handlebars.registerHelper('replaceNewLinesWithBR', block => block.replace(/[\r\n]+/g, '<br>'));
3+
Handlebars.registerHelper('replaceNewLinesWithBR', block =>
4+
block.replace(/[\r\n]+/gu, '<br>'));

index.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,27 @@ require('./helpers');
1414
* @public
1515
*/
1616

17-
const plugin = data => new Promise((resolve, reject) => {
17+
const plugin = data =>
18+
new Promise((resolve, reject) => {
1819

19-
fs.readFile(path.join(__dirname, 'template.hbs'), 'utf8', (err, contents) => {
20+
fs.readFile(
21+
path.join(__dirname, 'template.hbs'),
22+
'utf8',
23+
(err, contents) => {
2024

21-
if (err) {
25+
if (err) {
2226

23-
return reject(err);
27+
return reject(err);
2428

25-
}
29+
}
2630

27-
const template = Handlebars.compile(contents);
31+
const template = Handlebars.compile(contents);
2832

29-
return resolve(template(data));
33+
return resolve(template(data));
3034

31-
});
35+
}
36+
);
3237

33-
});
38+
});
3439

3540
module.exports = plugin;

0 commit comments

Comments
 (0)