docs: fix markdown lint issues in command docs

This commit is contained in:
albertony
2025-08-24 21:12:04 +02:00
parent 514535ad46
commit 2e02d49578
81 changed files with 963 additions and 719 deletions

View File

@@ -95,10 +95,10 @@ func (e example) output() string {
// go run ./ convmv --help
func sprintExamples() string {
s := "Examples: \n\n"
s := "Examples:\n"
for _, e := range examples {
s += fmt.Sprintf("```\n%s\n", e.command())
s += fmt.Sprintf("// Output: %s\n```\n\n", e.output())
s += fmt.Sprintf("\n```sh\n%s\n", e.command())
s += fmt.Sprintf("// Output: %s\n```\n", e.output())
}
return s
}
@@ -109,7 +109,7 @@ func commandTable() string {
for _, c := range commandList {
s += fmt.Sprintf("\n| `%s` | %s |", c.command, c.description)
}
s += "\n\n"
s += "\n"
return s
}
@@ -119,19 +119,19 @@ func SprintList() string {
var charmaps transform.CharmapChoices
s := commandTable()
s += "Conversion modes:\n\n```\n"
s += "\nConversion modes:\n\n```text\n"
for _, v := range algos.Choices() {
s += v + "\n"
}
s += "```\n\n"
s += "Char maps:\n\n```\n"
s += "Char maps:\n\n```text\n"
for _, v := range charmaps.Choices() {
s += v + "\n"
}
s += "```\n\n"
s += "Encoding masks:\n\n```\n"
s += "Encoding masks:\n\n```text\n"
for _, v := range strings.Split(encoder.ValidStrings(), ", ") {
s += v + "\n"
}
@@ -154,5 +154,5 @@ func main() {
defer out.Close()
}
fmt.Fprintf(out, "<!--- Docs generated by help.go - use go generate to rebuild - DO NOT EDIT --->\n\n")
fmt.Fprintln(out, SprintList())
fmt.Fprint(out, SprintList())
}