summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/change-setting.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/change-setting.lua b/examples/change-setting.lua
index 1c26545..13914d1 100644
--- a/examples/change-setting.lua
+++ b/examples/change-setting.lua
@@ -27,6 +27,12 @@ conf.settings.project.head = "refs/heads/master"
conf.settings.project.description = "Demonstration of settings"
-- Remove other.thing (will also elide trailing blank line)
conf.settings.other.thing = nil
+-- And add a new setting which will add a blank line.
+-- Note, that we cannot use conf.settings.person.name here because
+-- the '.person.' will return nil as there is no such prefix.
+conf.settings["person.name"] = "Lars"
+-- Although now we can do this:
+conf.settings.person.age = 42
io.stdout:write(conf:serialise())