From e587892673a52d15930971738162dc7fce2d2270 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Fri, 21 Jul 2023 13:04:44 +0800 Subject: [PATCH] all: refactor to use %q instead of "%s" --- doc/man_docs.go | 2 +- site/content/docgen/md.md | 2 +- site/content/docgen/rest.md | 2 +- site/content/docgen/yaml.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man_docs.go b/doc/man_docs.go index b8c15ce8..a9c85dd2 100644 --- a/doc/man_docs.go +++ b/doc/man_docs.go @@ -146,7 +146,7 @@ func manPreamble(buf io.StringWriter, header *GenManHeader, cmd *cobra.Command, description = cmd.Short } - cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% "%s" "%s" "%s" "%s" "%s" + cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% %q %q %q %q %q # NAME `, header.Title, header.Section, header.date, header.Source, header.Manual)) cobra.WriteStringAndCheck(buf, fmt.Sprintf("%s \\- %s\n\n", dashedName, cmd.Short)) diff --git a/site/content/docgen/md.md b/site/content/docgen/md.md index 1659175c..b9ee7683 100644 --- a/site/content/docgen/md.md +++ b/site/content/docgen/md.md @@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s --- diff --git a/site/content/docgen/rest.md b/site/content/docgen/rest.md index 3041c573..4f470192 100644 --- a/site/content/docgen/rest.md +++ b/site/content/docgen/rest.md @@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s --- diff --git a/site/content/docgen/yaml.md b/site/content/docgen/yaml.md index 172e61d1..e8d735a1 100644 --- a/site/content/docgen/yaml.md +++ b/site/content/docgen/yaml.md @@ -87,7 +87,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s ---