label flags: Increase allowed size
This commit is contained in:
parent
5dd92a6603
commit
6acc752bd9
2 changed files with 5 additions and 5 deletions
|
@ -127,10 +127,6 @@ func buildLabelFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, exc
|
|||
errs = append(errs, NewFlagError(exercice, &flag, flagline, fmt.Errorf("choices cannot be defined.")))
|
||||
}
|
||||
|
||||
if len(flag.Label) > 255 {
|
||||
errs = append(errs, NewFlagError(exercice, &flag, flagline, fmt.Errorf("label is too long (max 255 chars per label).")))
|
||||
}
|
||||
|
||||
f = &fic.FlagLabel{
|
||||
Order: int8(flagline),
|
||||
Label: flag.Label,
|
||||
|
@ -171,6 +167,10 @@ func buildKeyFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, defau
|
|||
}
|
||||
flag.Label = prep + flag.Label
|
||||
|
||||
if len(flag.Label) > 255 {
|
||||
errs = append(errs, NewFlagError(exercice, &flag, flagline, fmt.Errorf("label is too long (max 255 chars per label).")))
|
||||
}
|
||||
|
||||
if (flag.Type == "text" && !isFullGraphic(strings.Replace(raw, "\n", "", -1))) || (flag.Type != "text" && !isFullGraphic(raw)) {
|
||||
errs = append(errs, NewFlagError(exercice, &flag, flagline, fmt.Errorf("WARNING non-printable characters in flag, is this really expected?")))
|
||||
}
|
||||
|
|
Reference in a new issue