mirror of
https://github.com/kovetskiy/mark.git
synced 2026-03-14 06:07:36 +08:00
fix: trim whitespace when parsing 'content-appearance' flag
This commit is contained in:
parent
dcd28068f3
commit
875723da90
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
altsrc "github.com/urfave/cli-altsrc/v3"
|
||||
altsrctoml "github.com/urfave/cli-altsrc/v3/toml"
|
||||
@ -220,7 +221,7 @@ func CheckFlags(context context.Context, command *cli.Command) (context.Context,
|
||||
return context, errors.New("flags --title-from-h1 and --title-from-filename are mutually exclusive. Please specify only one")
|
||||
}
|
||||
|
||||
contentAppearance := command.String("content-appearance")
|
||||
contentAppearance := strings.TrimSpace(command.String("content-appearance"))
|
||||
if contentAppearance != "" {
|
||||
switch contentAppearance {
|
||||
case "full-width", "fixed":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user