config

package
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The string marking the beginning of a block. Defaults to '{%'
	BlockStartString string
	// The string marking the end of a block. Defaults to '%}'.
	BlockEndString string
	// The string marking the beginning of a print controlStructure. Defaults to '{{'.
	VariableStartString string
	// The string marking the end of a print controlStructure. Defaults to '}}'.
	VariableEndString string
	// The string marking the beginning of a comment. Defaults to '{#'.
	CommentStartString string
	// The string marking the end of a comment. Defaults to '#}'.
	CommentEndString string
	// If set to True the XML/HTML autoescaping feature is enabled by default.
	// For more details about autoescaping see Markup.
	// This can also be a callable that is passed the template name
	// and has to return True or False depending on autoescape should be enabled by default.
	AutoEscape bool
	// Whether to be strict about undefined attribute or item in an object and return error
	// or return a nil value on missing data and ignore it entirely
	StrictUndefined bool
	// If is set to true, the first newline after a block is removed (block, not variable !tag)
	TrimBlocks bool
	// If is set to true, the leading spaces and tabes are stripped from the start of a line to a block
	LeftStripBlocks bool
}

Config holds plexer and parser parameters

func New

func New() *Config

func (*Config) Inherit

func (c *Config) Inherit() *Config

Jump to

Keyboard shortcuts

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