mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
(fix) use first value in case variables.scss define multiple values per variable
defect: /api/banner crashes as no variable was found for the font
This commit is contained in:
parent
4357ba235a
commit
3cdf7b6814
@ -6,7 +6,7 @@ const __dirname = new URL('.', import.meta.url).pathname;
|
||||
const vars = {};
|
||||
|
||||
for (const [, name, value] of fs.readFileSync(`${__dirname}/../data/variables.scss`).toString('utf-8')
|
||||
.matchAll(/^\$([^:]+): '([^']+)';$/gm)) {
|
||||
.matchAll(/^\$([^:]+): '([^']+)'(?:, '[^']+')*;$/gm)) {
|
||||
vars[name] = value;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user