From fef7659306b78c5b39dfaaa1e5f537ba17a71c51 Mon Sep 17 00:00:00 2001 From: Simon Kok Date: Tue, 10 May 2022 10:54:22 +0200 Subject: [PATCH] Fix #3 - Trim whitespaces of rows generated in table body **Why:** As reported in issue #3, the body of the dependency table is generated with leading and trailing whitespaces. This generates errors when linting the files using pre-commit hooks that prohibit trailing spaces. **What:** Trim every row, so the leading and trailing spaces are removed correctly. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 77fca5b..5f2a1a9 100644 --- a/index.js +++ b/index.js @@ -102,7 +102,7 @@ function renderDependencies(dependency) { license, dependencyType, '', - ].join(' | '); + ].join(' | ').trim(); } module.exports = function DEPENDENCYTABLE(content, _options = {}, config) {