Documentation ¶
Overview ¶
Package tidyhtml cleans up HTML input and outputs a tidy version.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy HTML from src to dst and tidy it up in the process.
Example ¶
r := strings.NewReader(` <html> <head> <title>demo</title> </head> <body> <div><h1>this is a demo</h1> <p> ok </p> <div><span>this will do</span></div></div> </body></html> `) if err := Copy(os.Stdout, r); err != nil { fmt.Printf("Error: %s", err) }
Output: <html> <head> <title>demo</title> </head> <body> <div> <h1>this is a demo</h1> <p>ok</p> <div> <span>this will do</span> </div> </div> </body> </html>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.