From 31e11a0ab1c66e2c5f46df65ae8cca195dbffa09 Mon Sep 17 00:00:00 2001 From: arpio Date: Mon, 3 Nov 2025 00:00:03 +0100 Subject: [PATCH] Update lib.go --- lib.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib.go b/lib.go index aae61eb..36da95d 100644 --- a/lib.go +++ b/lib.go @@ -258,6 +258,8 @@ func Syntax(items ...SyntaxItem) Entry { return Entry{typ: syntax, syntax: Sequence(items...)} } +// Wrap can be used to wrap text into multiple similar length lines of maximum width. It may behave different +// for different entries and different output types. func Wrap(e Entry, width int) Entry { e.wrapWidth = width return e @@ -265,7 +267,7 @@ func Wrap(e Entry, width int) Entry { // Indent can be used to control indentation. Indentation may behave different depending on the output format. // The indent parameter sets the indentation in spaces for a section. The indentFirst parameter sets the -// indentation for the first line in the section and it is relative to indent parameter. +// indentation for the first line in the section and it is relative to the indent parameter. func Indent(e Entry, indent, indentFirst int) Entry { e.indent, e.indentFirst = indent, indentFirst return e @@ -299,8 +301,8 @@ func HTMLFragment(out io.Writer, doc Document) error { return renderHTMLFragment(out, doc) } -// HTMLFragment renders the input document as a HTML document. If the lang attribute is empty, it will be -// omitted from the html element. +// HTML renders the input document as an HTML document. If the lang attribute is empty, it will be omitted from +// the html element. func HTML(out io.Writer, doc Document, lang string) error { return renderHTML(out, doc, lang) }