subscript

package module
v0.0.0-...-186c331 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 9 Imported by: 0

README

goldmark-subscript

GoldMark subscript extension.

This implements the subscript of pandoc.

H~2~O is a liquid.  2^10^ is 1024.
<p>H<sub>2</sub>O is a liquid.  2^10^ is 1024.</p>
var md = goldmark.New(subscript.Enable)
var source = []byte("H~2~O is a liquid.  2^10^ is 1024.")
err := md.Convert(source, os.Stdout)
if err != nil {
    log.Fatal(err)
}

Documentation

Index

Constants

This section is empty.

Variables

Enable is a goldmark.Option with inline attributes support.

Extension is a goldmark.Extender with markdown inline attributes support.

View Source
var Kind = ast.NewNodeKind("Subscript")

Kind is the kind of hashtag AST nodes.

Functions

This section is empty.

Types

type Extender

type Extender struct{}

func (*Extender) Extend

func (e *Extender) Extend(m goldmark.Markdown)

type Node

type Node struct {
	ast.BaseInline
}

Node is a parsed Subscript node.

func (*Node) Dump

func (n *Node) Dump(src []byte, level int)

func (*Node) Kind

func (*Node) Kind() ast.NodeKind

Jump to

Keyboard shortcuts

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