diff --git a/Tomlet/Models/TomlDocument.cs b/Tomlet/Models/TomlDocument.cs index cdf8118..c26cc5e 100644 --- a/Tomlet/Models/TomlDocument.cs +++ b/Tomlet/Models/TomlDocument.cs @@ -1,4 +1,5 @@ using System.Text; +using Tomlet.Extensions; namespace Tomlet.Models { @@ -16,9 +17,9 @@ internal TomlDocument() internal TomlDocument(TomlTable from) { - foreach (var key in from.Keys) + foreach (var (key, value) in from) { - PutValue(key, from.GetValue(key)); + PutValue(TomlKeyUtils.FullStringToProperKey(key), value); } }