package transform
import "github.com/gohugoio/hugo/tpl/transform"
Index ¶
- type Namespace
- func New(deps *deps.Deps) *Namespace
- func (ns *Namespace) Emojify(s interface{}) (template.HTML, error)
- func (ns *Namespace) HTMLEscape(s interface{}) (string, error)
- func (ns *Namespace) HTMLUnescape(s interface{}) (string, error)
- func (ns *Namespace) Highlight(s interface{}, lang, opts string) (template.HTML, error)
- func (ns *Namespace) Markdownify(s interface{}) (template.HTML, error)
- func (ns *Namespace) Plainify(s interface{}) (string, error)
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides template functions for the "transform" namespace.
func New ¶
New returns a new instance of the transform-namespaced template functions.
func (*Namespace) Emojify ¶
Emojify returns a copy of s with all emoji codes replaced with actual emojis.
See http://www.emoji-cheat-sheet.com/
func (*Namespace) HTMLEscape ¶
HTMLEscape returns a copy of s with reserved HTML characters escaped.
func (*Namespace) HTMLUnescape ¶
HTMLUnescape returns a copy of with HTML escape requences converted to plain text.
func (*Namespace) Highlight ¶
Highlight returns a copy of s as an HTML string with syntax highlighting applied.
func (*Namespace) Markdownify ¶
Markdownify renders a given input from Markdown to HTML.
func (*Namespace) Plainify ¶
Plainify returns a copy of s with all HTML tags removed.
Source Files ¶
- Version
- v0.32.2
- Published
- Jan 3, 2018
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 1 hour ago –
Tools for package owners.