Skip to content

Commit 9eff691

Browse files
committed
chore: ignore SPDX-header-like lines in the license plugin
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent d8e8b88 commit 9eff691

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/frontend-legacy/WebpackSPDXPlugin.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ class WebpackSPDXPlugin {
203203
const match = source.match(/asset\/inline\|data:image\/svg\+xml,(.+)/)
204204
if (match) {
205205
const content = decodeURI(match[1])
206+
// REUSE-IgnoreStart
206207
const [, license] = content.match(/SPDX-License-Identifier:\s*([^\s]+)/) ?? []
207208
const [, author] = content.match(/SPDX-FileCopyrightText:\s*([^-]+)/) ?? []
209+
// REUSE-IgnoreEnd
208210
if (author && license) {
209211
authors.add(author)
210212
licenses.add(license)
@@ -218,12 +220,14 @@ class WebpackSPDXPlugin {
218220
output = ''
219221
}
220222

223+
// REUSE-IgnoreStart
221224
for (const author of [...authors].sort()) {
222225
output = `SPDX-FileCopyrightText: ${author}\n${output}`
223226
}
224227
for (const license of [...licenses].sort()) {
225228
output = `SPDX-License-Identifier: ${license}\n${output}`
226229
}
230+
// REUSE-IgnoreEnd
227231

228232
compilation.emitAsset(
229233
asset.split('?', 2)[0] + '.license',

0 commit comments

Comments
 (0)