change documentcli

Signed-off-by: B1F030 <b1fzhang@gmail.com>
This commit is contained in:
B1F030 2024-07-15 11:33:58 +08:00
parent 5c2590c358
commit 15ac95ddd0

View file

@ -75,7 +75,7 @@ func createFlagRow(flag *kingpin.FlagModel) []string {
name = fmt.Sprintf(`<code class="text-nowrap">-%c</code>, <code class="text-nowrap">--%s</code>`, flag.Short, flag.Name)
}
return []string{name, flag.Help, defaultVal}
return []string{name, strings.ReplaceAll(flag.Help, "|", "\|"), defaultVal}
}
func writeFlagTable(writer io.Writer, level int, fgm *kingpin.FlagGroupModel) error {