Permalink
Browse files

Data: don't allow <>= in identifiers.

Fixes bug with WHERE conditions like:  id="riku"
(since the = was parsed as part of the identifier).
Closes #10.
  • Loading branch information...
1 parent ca8d307 commit b1832da411b732dbda736e294a478f7b87dd4599 @jgm committed Mar 5, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 Yst/Data.hs
  2. +1 −1 demo/index.yaml
View
@@ -123,7 +123,7 @@ pDataField = do
return (fname, opts)
pIdentifier :: GenParser Char st [Char]
-pIdentifier = spaces >> (pQuoted '\'' <|> pQuoted '"' <|> many (noneOf " \t\n;,'\""))
+pIdentifier = spaces >> (pQuoted '\'' <|> pQuoted '"' <|> many (noneOf " \t\n<>=;,'\""))
-- | Case-insensitive string parser.
pString :: String -> GenParser Char st String
View
@@ -17,7 +17,7 @@
template : april_events.st
requires : event.st
data :
- april : FROM events.yaml WHERE date >= '2009-04-01' AND date < '2009-05-01' ORDER BY date
+ april : FROM events.yaml WHERE date>='2009-04-01' AND date < '2009-05-01' ORDER BY date
layout : layout.tex.st
inmenu : no

0 comments on commit b1832da

Please sign in to comment.