mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
fix: Fixed a bug with template selection.
This commit is contained in:
@@ -91,6 +91,9 @@ infer_layout :: proc(section: string, is_index: bool) -> string {
|
||||
return fmt.tprintf("%s_index", section)
|
||||
}
|
||||
if section != "" {
|
||||
if len(section) > 1 && section[len(section) - 1] == 's' {
|
||||
return section[:len(section) - 1]
|
||||
}
|
||||
return section
|
||||
}
|
||||
return "page"
|
||||
|
||||
Reference in New Issue
Block a user