File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -567,10 +567,7 @@ func (tabularTemplate) Prettify(s string) string {
567567// cli.BoolFlag will always return an default.
568568func getFlagDefaultValue (f cli.DocGenerationFlag ) (value , text string ) {
569569 if defaultText := f .GetDefaultText (); defaultText != "" {
570- if strings .HasPrefix (defaultText , "\" " ) && strings .HasSuffix (defaultText , "\" " ) {
571- defaultText = defaultText [1 : len (defaultText )- 1 ]
572- }
573- return "" , defaultText
570+ return "" , strings .Trim (defaultText , "\" " )
574571 }
575572
576573 if ! f .TakesValue () {
@@ -581,10 +578,7 @@ func getFlagDefaultValue(f cli.DocGenerationFlag) (value, text string) {
581578 }
582579
583580 if value := f .GetValue (); value != "" {
584- if strings .HasPrefix (value , "\" " ) && strings .HasSuffix (value , "\" " ) {
585- value = value [1 : len (value )- 1 ]
586- }
587- return value , ""
581+ return strings .Trim (value , "\" " ), ""
588582 }
589583 return "" , ""
590584}
You can’t perform that action at this time.
0 commit comments