html

package
v0.0.0-...-8ea42c6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package html implements expanders based on the special makers recognized by Cherry. --

  • Copyright (C) 2015 by Rafael Santiago *
  • This is a free software. You can redistribute it and/or modify under
  • the terms of the GNU General Public License version 2. *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBadAssErrorData

func GetBadAssErrorData() string

GetBadAssErrorData spits the default 404 Cherry's document.

Types

type Preprocessor

type Preprocessor struct {
	// contains filtered or unexported fields
}

Preprocessor is returned by NewHTMLPreprocessor and it actually performs the content expansion.

func NewHTMLPreprocessor

func NewHTMLPreprocessor(rooms *config.CherryRooms) *Preprocessor

NewHTMLPreprocessor creates a new HTML preprocessor.

func (*Preprocessor) ExpandData

func (p *Preprocessor) ExpandData(roomName, data string) string

ExpandData gives preference for statical data if it does not exist the data is processed by expanders.

func (*Preprocessor) Init

func (p *Preprocessor) Init(rooms *config.CherryRooms)

Init sets all default expanders.

func (*Preprocessor) SetDataValue

func (p *Preprocessor) SetDataValue(field, data string)

SetDataValue sets a statical content for a special marker.

func (*Preprocessor) UnsetDataValue

func (p *Preprocessor) UnsetDataValue(field string)

UnsetDataValue removes a previous data set by SetDataValue.

Jump to

Keyboard shortcuts

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