mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 08:48:22 +02:00
Potential fix for code scanning alert no. 31: Inefficient regular expression (#4723)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ for (const file of readdirSync(path.join(import.meta.dirname, '../docs/images'))
|
||||
[
|
||||
groupOpeningTag,
|
||||
...readFileSync(path.join(import.meta.dirname, `../icons/${iconName}.svg`), 'utf8')
|
||||
.replace(/(<svg)([^>]|\n)*>|<\/svg>/g, '')
|
||||
.replace(/(<svg)[^>]*>|<\/svg>/g, '')
|
||||
.split('\n'),
|
||||
]
|
||||
.map((val) => val.trimEnd())
|
||||
|
||||
Reference in New Issue
Block a user