diff --git a/source/readconf.d b/source/readconf.d index c9aa760..ac6e942 100644 --- a/source/readconf.d +++ b/source/readconf.d @@ -84,7 +84,7 @@ private: { if (match[group][0] == '\'') group = 10; - if (match[group][0] == '\"') + else if (match[group][0] == '\"') group = 8; } this.properties[match[1]] = PP(match[1], match[group]); diff --git a/tests/test.d b/tests/test.d index bfb5424..9187e15 100644 --- a/tests/test.d +++ b/tests/test.d @@ -9,8 +9,7 @@ unittest assert(Config.file.key("value3") == "Or take in apostrophes"); assert(Config.file.key("value4") == "You can also comment"); assert(Config.file.key("value5") == "So you can also comment"); - // assert(Config.file.key("value6") == "\"And you can even do that!\""); - assert(Config.file.key("value6") == ""); // D unable to read quotes + assert(Config.file.key("value6") == "\"And you can even do that!\""); assert(Config.file.key("value7") == "1234567890"); assert(Config.file.key("value8") == "12345.67890"); assert(Config.file.key("value9") == "You can use large margins");