Skip to content

Commit

Permalink
Restrict pattern for space-separated arguments in glob regex
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Jan 16, 2024
1 parent 15102f0 commit b94d7e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/embeds/glob.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2022 DigitalOcean
Copyright 2024 DigitalOcean
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -78,7 +78,7 @@ module.exports = md => {
if (closingMark === -1) return false;

// Check for glob match
const match = currentLines.slice(0, closingMark + 3).match(/^\[glob (.+?(?:(?: .+?)+|(?:\n.+?)+))\](?:$|\n)/);
const match = currentLines.slice(0, closingMark + 3).match(/^\[glob (.+?(?:(?: [^ \n]+?)+|(?:\n.+?)+))\](?:$|\n)/);
if (!match) return false;

// Get the full strings
Expand Down

0 comments on commit b94d7e7

Please sign in to comment.