Conversation
| @@ -0,0 +1,161 @@ | |||
| package baker | |||
There was a problem hiding this comment.
at first glance I'd had called these files help_text and help_markdown, to visually group all together. It it a convention to call them with the trailing _help?
| } | ||
|
|
||
| // RenderHelpMarkdown calls PrintHelp withy format markdown but render the | ||
| // markdown for terminal consulation. |
There was a problem hiding this comment.
consulation -> consultation?
| return h, nil | ||
| } | ||
|
|
||
| func dumpConfigHelp(w io.Writer, cfg interface{}) { |
| fmt.Fprint(w, sep, "\n") | ||
| } | ||
|
|
||
| /* |
| return nil | ||
| } | ||
|
|
||
| func breakAfterDots(s string) string { |
There was a problem hiding this comment.
in markdown, newline requires two spaces before a \n if we don't want to leave a blank line or \n\n otherwise. A single \n is rendered as a simple space without newline.
There was a problem hiding this comment.
uh?! a single \n is rendered as a \n in markdown when it's at the end of a text line.
The objective here is to add a carriage return (i.e just go to the next line) and this is what that does.
What you're saying with the 2 spaces is \n\n is if you want to force a line jump on a blank line.
Here we're not dealing with blank lines, but line with text, so adding \n does what is expected.
Don't you agree?
There was a problem hiding this comment.
no really, markdown specs says that 2 spaces + \n correspond to a line break :) https://www.markdownguide.org/basic-syntax/#line-breaks
most markdown renderers also render a single \n as a line break, but many others, including GH, don't
There was a problem hiding this comment.
while 2 blank lines create a paragraph https://www.markdownguide.org/basic-syntax/#paragraphs-1
❓ What
Implement markdown generation from component description structures.
🔨 How to test
✅ Checklists
This section contains a list of checklists for common uses, please delete the checklists that are useless for your current use case (or add another checklist if your use case isn't covered yet).
make gofmt-writebeen run on the code?make govetbeen run on the code? Has the code been fixed accordingly to the output?