Uncomment generated-config's global section header, comment all others. (#116)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-08-03 21:51:16 +00:00
parent fa8ad1d629
commit bc898efcce
2 changed files with 3 additions and 2 deletions

View File

@@ -73,7 +73,8 @@ fn generate_example(input: &ItemStruct, args: &[Meta], write: bool) -> Result<To
.expect("written to config file");
}
file.write_fmt(format_args!("\n#[{section}]\n"))
let pound = if section != "global" { "#" } else { "" };
file.write_fmt(format_args!("\n{pound}[{section}]\n"))
.expect("written to config file");
}

View File

@@ -15,7 +15,7 @@
### For more information, see:
### https://tuwunel.chat/configuration.html
#[global]
[global]
# The server_name is the pretty name of this server. It is used as a
# suffix for user and room IDs/aliases.