From 8b7a9e9bb06795476cb53b008c06a80b04fda99c Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sun, 14 Jul 2019 16:34:13 +1200 Subject: [PATCH] Ignore invalid selectors. --- src/Data/CSS/Syntax/StyleSheet.hs | 1 + stylish-haskell.cabal | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Data/CSS/Syntax/StyleSheet.hs b/src/Data/CSS/Syntax/StyleSheet.hs index 84de2b2..b46ac78 100644 --- a/src/Data/CSS/Syntax/StyleSheet.hs +++ b/src/Data/CSS/Syntax/StyleSheet.hs @@ -52,6 +52,7 @@ parse' stylesheet tokens = parse' (addRules stylesheet rule) tokens' -------- parseProperties (LeftCurlyBracket:tokens) = parseProperties' tokens parseProperties (Whitespace:tokens) = parseProperties tokens +parseProperties (_:tokens) = ([], tokens) parseProperties [] = ([], []) parseProperties' (Whitespace:tokens) = parseProperties' tokens diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index c783883..c3a634b 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -10,7 +10,7 @@ name: stylish-haskell -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 0.2.0 +version: 0.2.1 -- A short (one-line) description of the package. synopsis: Apply CSS styles to a document tree. -- 2.30.2