diff options
author | bptato <nincsnevem662@gmail.com> | 2025-04-01 21:17:01 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-04-01 21:24:04 +0200 |
commit | 84c3902e94c6f0e01fb122511ebdc762464ece93 (patch) | |
tree | 319aca9f15ed731fad96a73465825c5305cdc4d9 /src | |
parent | 9e1098a649c80fa7a3ac8d492594bd76460ea46c (diff) | |
download | chawan-84c3902e94c6f0e01fb122511ebdc762464ece93.tar.gz |
config: fix semicolon handling in user-style import
ok so apparently you can leave out the semicolon, but *only* if the at rule is at EOF
Diffstat (limited to 'src')
-rw-r--r-- | src/config/config.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index 6d07238e..073aea1a 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -805,6 +805,14 @@ proc parseConfigValue(ctx: var ConfigParser; x: var StyleString; v: TomlValue; let tok = s.parseCSSString(ending, i) if tok.t != cttString: break + while s.nextCSSToken(i): + if s[i] in AsciiWhitespace or + i + 1 < s.len and s[i] == '\\' and s[i + 1] == '\n': + inc i + continue + break + if i < s.len and s[i] != ';': + break let path = ChaPath(tok.value).unquote(ctx.config.dir) if path.isNone: return err(k & ": wrong CSS import (" & $tok.value & |