Allow literal dot in config section names BugzID: 15952
Project: http://git-wip-us.apache.org/repos/asf/couchdb-config/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-config/commit/a352def9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-config/tree/a352def9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-config/diff/a352def9 Branch: refs/heads/import Commit: a352def9ad650cfd80332e32f728cb6d108796d1 Parents: a6b04e5 Author: Robert Newson <robert.new...@cloudant.com> Authored: Wed Dec 5 15:35:46 2012 +0000 Committer: Paul J. Davis <paul.joseph.da...@gmail.com> Committed: Fri Jan 17 13:24:55 2014 -0800 ---------------------------------------------------------------------- src/config_writer.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-config/blob/a352def9/src/config_writer.erl ---------------------------------------------------------------------- diff --git a/src/config_writer.erl b/src/config_writer.erl index 82a2ba2..2812686 100644 --- a/src/config_writer.erl +++ b/src/config_writer.erl @@ -31,7 +31,7 @@ save_to_file({{Section, Key}, Value}, File) -> Lines = re:split(OldFileContents, "\r\n|\n|\r|\032", [{return, list}]), SectionLine = "[" ++ Section ++ "]", - {ok, Pattern} = re:compile(["^(", Key, "\\s*=)|\\[[a-zA-Z0-9\_-]*\\]"]), + {ok, Pattern} = re:compile(["^(", Key, "\\s*=)|\\[[a-zA-Z0-9\.\_-]*\\]"]), NewLines = process_file_lines(Lines, [], SectionLine, Pattern, Key, Value), NewFileContents = reverse_and_add_newline(strip_empty_lines(NewLines), []),