ci(lint): fix usercss-meta parse error (#331)
This commit is contained in:
1 parent
610e977d7b
commit
f977c5a64c
2 files changed
+14
-2
No files matched your search
+13
-1
@@ -30,7 +30,19 @@ for await (const entry of stylesheets) {
|
|||||||
|
|
||||||
// verify the usercss metadata
|
// verify the usercss metadata
|
||||||
const { globalVars, isLess } = await verifyMetadata(entry, content, repo)
|
const { globalVars, isLess } = await verifyMetadata(entry, content, repo)
|
||||||
.catch(() => ({ globalVars: {}, isLess: false }));
|
.catch((e) => {
|
||||||
|
const lines = content.split("\n");
|
||||||
|
let startLine = -1;
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
const line = lines[i];
|
||||||
|
if (e.index >= line.length) {
|
||||||
|
e.index -= line.length;
|
||||||
|
startLine++;
|
||||||
|
} else break;
|
||||||
|
}
|
||||||
|
log(e.message, { file, startLine, content }, "error");
|
||||||
|
throw e;
|
||||||
|
});
|
||||||
// don't attempt to compile or lint non-less files
|
// don't attempt to compile or lint non-less files
|
||||||
if (!isLess) continue;
|
if (!isLess) continue;
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
* The values below are examples and may need to be adapted.
|
* The values below are examples and may need to be adapted.
|
||||||
* To apply the correct Theming call the above defined Mixin and pass
|
* To apply the correct Theming call the above defined Mixin and pass
|
||||||
* your desired Flavor and Accent Color to it. These are usually
|
* your desired Flavor and Accent Color to it. These are usually
|
||||||
* populated through the `@var`s in the Meta Block. */
|
* populated through the @vars in the Meta Block. */
|
||||||
// synced colorscheme
|
// synced colorscheme
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: light) {
|
||||||
.no-theme {
|
.no-theme {
|
||||||
|
|||||||
Reference in new issue
Block a user