From 24f62c65c8c07aaa4c2289708bdc2aee9df47d6b Mon Sep 17 00:00:00 2001 From: Shoibal Chakravarty Date: Tue, 18 Mar 2014 14:51:06 +0530 Subject: [PATCH] strip leading/trailing white space and following inline comments (is separated by at least a space or a tab) from value --- src/IniFile.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IniFile.jl b/src/IniFile.jl index 6839294..83a848e 100644 --- a/src/IniFile.jl +++ b/src/IniFile.jl @@ -60,7 +60,7 @@ function read(inifile::Inifile, stream::IO) idx = max(i, j) end key = rstrip(s[1:idx-1]) - val = lstrip(s[idx+1:end]) + val = strip(split(s[idx+1:end],r"[\t, ][#,;]")[1]) current_section[key] = val end end