Merge pull request #6301 from cli/liquid-docs
Escape liquid tags in site docs
This commit is contained in:
commit
acfa85cd00
1 changed files with 2 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ func GenMarkdown(cmd *cobra.Command, w io.Writer) error {
|
|||
|
||||
// GenMarkdownCustom creates custom markdown output.
|
||||
func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error {
|
||||
fmt.Fprint(w, "{% raw %}")
|
||||
fmt.Fprintf(w, "## %s\n\n", cmd.CommandPath())
|
||||
|
||||
hasLong := cmd.Long != ""
|
||||
|
|
@ -112,6 +113,7 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
|
|||
if err := printOptions(w, cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprint(w, "{% endraw %}\n")
|
||||
|
||||
if len(cmd.Example) > 0 {
|
||||
fmt.Fprint(w, "### Examples\n\n{% highlight bash %}{% raw %}\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue