Permalink
Browse files

Allow underscores in section names

  • Loading branch information...
1 parent 25516a0 commit a11d63e73198f6d757463550c22a2cfabe506324 @sol sol committed Jun 26, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/Data/Ini/Reader/Internals.hs
  2. +1 −1 tst/ReaderI.hs
@@ -71,7 +71,7 @@ eatWhiteSpace = many $ oneOf " \t"
-- surrounded by any number of white space characters (see 'eatWhiteSpace').
secParser :: Parser IniFile
secParser = let
- validSecNameChrs = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "-/@"
+ validSecNameChrs = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "_-/@"
in do
char '['
eatWhiteSpace
View
@@ -42,7 +42,7 @@ case_secParserAllowedChars4 = let
case_secParserDisallowedChars1 = let
expected = Left "bad"
- actual = p2E secParser "sec" "[_foo]\n"
+ actual = p2E secParser "sec" "[$foo]\n"
in expected @=? actual
case_secParserDropSpace = let

0 comments on commit a11d63e

Please sign in to comment.