update documentation
This commit is contained in:
parent
4a91472c74
commit
c4773eb94f
9
lib.go
9
lib.go
@ -348,6 +348,9 @@ func Void(t Tag) Tag {
|
||||
// Non-tag child nodes are rendered via fmt.Sprint. Consecutive spaces are considered to be so on purpose, and
|
||||
// are converted into . Spaces around tags, in special cases, can behave different from when using
|
||||
// unindented rendering.
|
||||
//
|
||||
// It returns an error only when either one or more tags are invalid, or the underlying writer returns an
|
||||
// error.
|
||||
func WriteIndent(out io.Writer, indent Indentation, t ...Tag) error {
|
||||
if indent.PWidth < indent.MinPWidth {
|
||||
indent.PWidth = indent.MinPWidth
|
||||
@ -383,11 +386,17 @@ func WriteIndent(out io.Writer, indent Indentation, t ...Tag) error {
|
||||
// Write renders html with t as the root nodes with the default indentation and wrapping. Tabs are used as
|
||||
// indentation string, and a paragraph with of 120. The minimum paragraph width is 60. Indentation and width
|
||||
// concerns only the HTML text, not the displayed document.
|
||||
//
|
||||
// It returns an error only when either one or more tags are invalid, or the underlying writer returns an
|
||||
// error.
|
||||
func Write(out io.Writer, t ...Tag) error {
|
||||
return WriteIndent(out, Indentation{Indent: "\t"}, t...)
|
||||
}
|
||||
|
||||
// WriteRaw renders html with t as the root nodes without indentation or wrapping.
|
||||
//
|
||||
// It returns an error only when either one or more tags are invalid, or the underlying writer returns an
|
||||
// error.
|
||||
func WriteRaw(out io.Writer, t ...Tag) error {
|
||||
return WriteIndent(out, Indentation{}, t...)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user