Skip to content

Commit

Permalink
Prettier style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSto committed Jun 21, 2022
1 parent affa280 commit 6ec0599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/build/fix-links.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export default function attacher(options) {
}
} catch (error) {
console.error(error);
console.error(`Error fixing url in Markdown ${nodeType} in ${file.path}:\n`, trunc(repr(node), 200));
console.error(
`Error fixing url in Markdown ${nodeType} in ${file.path}:\n`,
trunc(repr(node), 200)
);
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ module.exports.repr = repr;

/** Truncate long strings with an ellipsis, and leave alone strings that are already short enough.
*/
function trunc(str, maxLen, endChar="…") {
function trunc(str, maxLen, endChar = "…") {
if (str.length > maxLen) {
return str.slice(0, maxLen)+endChar;
return str.slice(0, maxLen) + endChar;
} else {
return str;
}
Expand Down

0 comments on commit 6ec0599

Please sign in to comment.