html

package
v0.0.0-...-e7b361f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package html removes whitespace and comments from HTML code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paragraphs

func Paragraphs(s string) template.HTML

Paragraphs takes a plain text string, replaces single line breaks by <br>, and wraps <p></p> tags around text blocks that are separated by two or more line breaks.

func RemoveComments

func RemoveComments(html []byte) []byte

RemoveComments removes HTML comments.

func RemoveWhitespace

func RemoveWhitespace(html []byte) []byte

RemoveWhitespace removes whitespace between tags, actions, and at the beginning and end of the HTML code.

Types

This section is empty.

Directories

Path Synopsis
Package elements provides a data structure for representing HTML elements.
Package elements provides a data structure for representing HTML elements.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL