convert

package
v0.0.0-...-4afba3a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

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

Process starts a mandoc process to convert manpages to HTML.

func NewProcess

func NewProcess() (*Process, error)

func (*Process) Kill

func (p *Process) Kill() error

func (*Process) ToHTML

func (p *Process) ToHTML(r io.Reader, resolve func(ref string) string) (doc string, toc []string, err error)

TODO(stapelberg): ToHTML’s output currently is used directly as (html/template).HTML, i.e. “known safe HTML document fragment”. We should be more aggressive in whitelisting the allowed tags.

resolve, if non-nil, will be called to resolve a reference (like “rm(1)”) into a URL.

Jump to

Keyboard shortcuts

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