Move name config value into Config

This commit is contained in:
Aoran Zeng
2025-07-16 20:51:08 +08:00
parent f26817f433
commit 2a27fd4fc1
2 changed files with 13 additions and 11 deletions

View File

@@ -99,9 +99,19 @@ class SectionConfig {
return self.get-direct-config('language');
}
#| RS4C-String 或 RS4C-Nil
#| RS4C-String
method name() {
return self.get-direct-config('name');
# RS4C-String 或 RS4C-Nil
my $config-name = self.get-direct-config('name');
my $name;
if $config-name.is-nil {
$name = $.section.title.lc
} else {
$name = $config-name.string-value;
}
return Parser::ConfigItem's-Value.new($name);
}
#| RS4C-Bool