processors

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeProcessor

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

CompositeProcessor combines multiple HTML processors into one. During the processing stage, it will apply each processor in the order they were added.

func NewCompositeProcessor

func NewCompositeProcessor(processors ...HTMLProcessor) *CompositeProcessor

NewCompositeProcessor creates a new CompositeProcessor with the given processors.

func (*CompositeProcessor) Process

func (c *CompositeProcessor) Process(html string) (string, error)

Process applies all processors in order to the given HTML string.

type HTMLProcessor

type HTMLProcessor interface {
	Process(html string) (string, error)
}

HTMLProcessor defines the interface for processing HTML content

type PremailerProcessor

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

PremailerProcessor implements HTMLProcessor using premailer

func NewPremailerProcessor

func NewPremailerProcessor(options *premailer.Options) *PremailerProcessor

NewPremailerProcessor creates a new PremailerProcessor with the given options

func (*PremailerProcessor) Process

func (p *PremailerProcessor) Process(html string) (string, error)

Process applies the premailer transformation to the given HTML string

Jump to

Keyboard shortcuts

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