Fix dependabot issues
This commit is contained in:
parent
c89d9bd8b0
commit
531c6ba7c8
705 changed files with 53406 additions and 20466 deletions
8
node_modules/code-excerpt/index.js
generated
vendored
8
node_modules/code-excerpt/index.js
generated
vendored
|
|
@ -1,5 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
const tabsToSpaces = require('convert-to-spaces');
|
||||
|
||||
const generateLineNumbers = (line, around) => {
|
||||
|
|
@ -27,10 +26,13 @@ module.exports = (source, line, options) => {
|
|||
source = tabsToSpaces(source).split(/\r?\n/);
|
||||
|
||||
if (line > source.length) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
|
||||
options = Object.assign({around: 3}, options);
|
||||
options = {
|
||||
around: 3,
|
||||
...options
|
||||
};
|
||||
|
||||
return generateLineNumbers(line, options.around)
|
||||
.filter(line => source[line - 1] !== undefined)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue