lib.typ: better code branching

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-20 20:09:13 +03:00
parent 3ca8409e58
commit 04c5b283e7

15
lib.typ
View File

@ -705,7 +705,9 @@
ст. гр. #edu_program\-#author.group\ ст. гр. #edu_program\-#author.group\
#author.name\ #author.name\
] ]
if "variant" in author.keys() and author.variant != none [Варіант: #author.variant] if (
"variant" in author.keys() and author.variant != none
) [Варіант: #author.variant]
} else [ } else [
Виконали:\ Виконали:\
ст. гр. #edu_program\-#authors.at(0).group\ ст. гр. #edu_program\-#authors.at(0).group\
@ -717,14 +719,15 @@
#if mentors.len() == 1 { #if mentors.len() == 1 {
let mentor = mentors.at(0) let mentor = mentors.at(0)
if mentor.gender == none [Перевірили:\ ] else if ( if "gender" in mentor.keys() {
mentor.gender == "m" if mentor.gender == "m" [Перевірив:\ ] else if (
) [Перевірив:\ ] else [Перевірилa:\ ] mentor.gender == "f"
) [Перевірила:\ ]
} else [Перевірили:\ ]
[ [
#if mentor.degree != none [#mentor.degree\ ]
#mentor.name\ #mentor.name\
] ]
} else [ } else if mentors.len() > 1 [
Перевірили:\ Перевірили:\
#for mentor in mentors { #for mentor in mentors {
[ [