On Wednesday, 22 November 2017 19:09:46 UTC+1, simon place wrote: > > trying to work around these issues, i find another undocumented 'feature' > > https://play.golang.org/p/dzcq5XKpgG > > It is the same logic:
A heading is a heading to a normal text paragraph. Lines are not headings by themselves but because the are ahead of the text they headline. (Its a bit like preformatted text. No comment by itself is treated as preformatted: It must be indented to some normal paragraph text to be rendered as preformatted.) This is basically the difference to markdown et al. In Markdown you *mark* a line as headline. The godoc way is different: If it happens *to be a headline* it is rendered as such. And the rules for being a headline are a bit like in printing where headlines start with a capital, has no punctuation and is *properly placed* (according to book printing typsetting rules): It comes before some actual copy text which it is headlining. No copy after the headline, no headline. Typesetters typically do not show figures or tables directly after a headline (at least not in the main part of a book). Rule of thumb: If you want a line to be rendered as a heading: Make it a heading. This includes several formal things like "single line", "surrounded by newlines", "Capital start", "punctuation free" and some semantic things like: It must headline actual copy. V. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.