Trim flags to avoid mistakes due to empty lines or espaces...
This commit is contained in:
parent
e6d8f2db1b
commit
0cc72712a4
7 changed files with 24 additions and 14 deletions
|
@ -404,6 +404,7 @@ type uploadedFlag struct {
|
|||
Placeholder string
|
||||
IgnoreCase bool
|
||||
Multiline bool
|
||||
NoTrim bool
|
||||
ValidatorRe *string `json:"validator_regexp"`
|
||||
Flag string
|
||||
Value []byte
|
||||
|
@ -425,7 +426,7 @@ func createExerciceFlag(exercice *fic.Exercice, body []byte) (interface{}, error
|
|||
vre = uk.ValidatorRe
|
||||
}
|
||||
|
||||
return exercice.AddRawFlagKey(uk.Label, uk.Type, uk.Placeholder, uk.IgnoreCase, uk.Multiline, vre, []byte(uk.Flag), uk.ChoicesCost)
|
||||
return exercice.AddRawFlagKey(uk.Label, uk.Type, uk.Placeholder, uk.IgnoreCase, uk.NoTrim, uk.Multiline, vre, []byte(uk.Flag), uk.ChoicesCost)
|
||||
}
|
||||
|
||||
func showExerciceFlag(flag *fic.FlagKey, _ *fic.Exercice, body []byte) (interface{}, error) {
|
||||
|
|
Reference in a new issue