2 Reading and Writing HTML
function | |||||
| |||||
| |||||
function | |||||
|
By default, html.write add newlines in a way that cannot change the meaning of the HTML document: by placing newlines just before the ending > of some closing tags. See html.NewlineMode for details.
function | ||||
| ||||
function | ||||
| ||||
function | ||||
| ||||
| ||||
function | ||||
|
enumeration | ||||
|
#'none: No extra newlines are added.
#'safe: Newlines are added to the closing tag of some elements, just before the ending >. This newline will always be ignored when the generated HTML format is parsed again. A newline is added only for elements using one of the names in {"head", "body", "meta", "script", "td", "tr", "div", "li", "h1", "h2", "h3", "h4", "h5", "h6"}.
#'pretty: Newlines are added between elements where it is expected to not change the rendering of the document, but this expectation is potentially wrong depending on CSS styling. A newline is added between immediate elements in a "head" element, a newline is added between elements that have the same name among the names in {"td", "tr", "div", "li"}, and a newline is added at the end of the document.