Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 63350a5

Browse files
committed
Ignore comments starting with # in ParseKeyValueText/TextFileSettings
1 parent f07dd6a commit 63350a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceStack.Text/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ public static Dictionary<string,string> ParseKeyValueText(this string text, stri
902902
foreach (var parts in text.ReadLines().Select(line => line.SplitOnFirst(delimiter)))
903903
{
904904
var key = parts[0].Trim();
905-
if (key.Length == 0) continue;
905+
if (key.Length == 0 || key.StartsWith("#")) continue;
906906
to[key] = parts.Length == 2 ? parts[1].Trim() : null;
907907
}
908908

0 commit comments

Comments
 (0)