parser

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute = orderedmap.Element[string, string]

type Attributes

type Attributes = orderedmap.OrderedMap[string, string]

type MJMLComponent

type MJMLComponent struct {
	TagName   string
	EndingTag bool
}

type MJMLIncludedIn

type MJMLIncludedIn struct {
	File string
	Line int
}

type MJMLNode

type MJMLNode struct {
	File             string
	Line             int
	AbsoluteFilePath string
	TagName          string
	IncludedIn       []*MJMLIncludedIn
	Attributes       *Attributes
	Content          string

	Parent   *MJMLNode
	Children []*MJMLNode

	Err error
}

func MJMLParser

func MJMLParser(xml []byte, options MJMLParserOptions, includedIn []*MJMLIncludedIn) (*MJMLNode, error)

type MJMLParserOptions

type MJMLParserOptions struct {
	AddEmptyAttributes bool
	Components         []MJMLComponent
	ConvertBooleans    bool
	KeepComments       bool
	FilePath           string
	ActualPath         string
	IgnoreIncludes     bool
	Preprocessors      []MJMLPreprocessor
}

type MJMLPreprocessor

type MJMLPreprocessor func([]byte) []byte

Jump to

Keyboard shortcuts

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