diff --git a/src/web/vaev-style/decls.h b/src/web/vaev-style/decls.h index 2f87221..bd940ad 100644 --- a/src/web/vaev-style/decls.h +++ b/src/web/vaev-style/decls.h @@ -2,6 +2,8 @@ #include +#include "base.h" + namespace Vaev::Style { template @@ -36,7 +38,7 @@ Res

parseDeclaration(Css::Sst const &sst) { auto res = parseDeclarationValue(cursor); if (not res) { resDecl = res.none(); - return false; + return true; } resDecl = Ok(res.take()); @@ -46,6 +48,11 @@ Res

parseDeclaration(Css::Sst const &sst) { resDecl.unwrap().important = Important::YES; } + eatWhitespace(cursor); + if (not cursor.ended()) + resDecl = Error::invalidData("unknown tokens in content"); + + return true; });