Documentation ¶
Index ¶
- func CitationToBibliography(doc ast.Node) (normative ast.Node, informative ast.Node)
- func Hook(data []byte) (ast.Node, []byte, int)
- func IndexToDocumentIndex(doc ast.Node) *mast.DocumentIndex
- func NodeBackMatter(doc ast.Node) ast.Node
- func ReferenceHook(data []byte) (ast.Node, []byte, int)
- func TitleHook(data []byte) (ast.Node, []byte, int)
- type Initial
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CitationToBibliography ¶
CitationToBibliography walks the AST and gets all the citations on HTML blocks and groups them into normative and informative references.
func IndexToDocumentIndex ¶
func IndexToDocumentIndex(doc ast.Node) *mast.DocumentIndex
IndexToDocumentIndex crawls the entire doc searching for indices, it will then return an mast.DocumentIndex that contains a tree:
IndexLetter - IndexItem
- IndexLink
- IndexSubItem
- IndexLink
- IndexLink
Which can then be rendered by the renderer.
func NodeBackMatter ¶ added in v1.9.95
NodeBackMatter is the place where we should inject the bibliography
func ReferenceHook ¶
ReferenceHook is the hook used to parse reference nodes.
Types ¶
type Initial ¶
type Initial string
Initial is the initial file we are working on, empty for stdin and adjusted is we we have an absolute or relative file.
func (Initial) ReadInclude ¶
ReadInclude is the hook to read includes. Its supports the following options for address.
4,5 - line numbers separated by commas N, - line numbers, end not specified, read until the end. /start/,/end/ - regexp separated by commas optional a prefix="" string.