html

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: AGPL-3.0 Imports: 8 Imported by: 0

README

How the HTML conversion works

Uses the "golang.org/x/net" repository package "html" to parse the HTML into a tree, then walks the tree using processHeadings() to make a series of sections with a heading as their title and the following HTML as the body.

Importantly, if a heading is within some other structure, that other structure is ignored in order to get the heading into the list. This seems to mostly work well, but may have some unintended side-effects.

On the subject of unintended side-effects, or rather their avoidance, "script" HTML tags and their contents are not passed through.

Documentation

Overview

Package html documizes html files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(ctx context.Context, in interface{}) (interface{}, error)

Convert provides the standard interface for conversion of an HTML document. All the function does is return a pointer to api.DocumentConversionResponse with PagesHTML set to the given (*api.DocumentConversionRequest).Filedata - so effectively a no-op.

func SplitIfHTML

SplitIfHTML splits HTML code into pages, if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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