diff --git a/keyword-args.cabal b/keyword-args.cabal
--- a/keyword-args.cabal
+++ b/keyword-args.cabal
@@ -1,5 +1,5 @@
 name:                keyword-args
-version:             0.1.0.3
+version:             0.1.0.4
 synopsis:            Extract data from a keyword-args config file format
 
 description: Extracts data from a configuration file with keywords
diff --git a/src/Data/KeywordArgs/Parse.hs b/src/Data/KeywordArgs/Parse.hs
--- a/src/Data/KeywordArgs/Parse.hs
+++ b/src/Data/KeywordArgs/Parse.hs
@@ -26,22 +26,32 @@
 manyTill1 :: GenParser tok st a -> GenParser tok st end -> GenParser tok st [a]
 manyTill1 p end = liftM2 (:) p (manyTill p end)
 
+isValidKeyChar :: Char -> Bool
+isValidKeyChar c =  c /= '#' && (not . isSpace) c
+
+
+isValidValueChar :: Char -> Bool
+isValidValueChar c =  c /= '#'
+
+
 configurationOption :: Parser (String, String)
 configurationOption = do
   many space
 
-  option <- many1 (satisfy (not . isSpace))
-
-  many1 space
+  keyword <- manyTill1 (satisfy isValidKeyChar) (many1 (char ' '))
 
   let
-    endOfOption   = comment <|> endOfLineOrInput
-    quotedValue   = char '"' *> manyTill anyChar (try (char '"')) <* endOfOption
-    unquotedValue = manyTill1 anyChar endOfOption
+    endOfOption   = endOfLineOrInput <|> comment
 
+    quotedValue   = char '"' *>
+                    manyTill1 (satisfy isValidValueChar) (try (char '"')) <*
+                    endOfOption
+
+    unquotedValue = manyTill1 (satisfy isValidValueChar) endOfOption
+
   value <- quotedValue <|> unquotedValue
 
-  return (option, value)
+  return (keyword, value)
 
 comment :: Parser ()
 comment =
