superscript

package module
v0.0.0-...-09ae3fb Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 9 Imported by: 0

README

goldmark-superscript

GoldMark superscript extension.

This implements the superscript of pandoc.

H~2~O is a liquid.  2^10^ is 1024.
<p>H~2~O is a liquid.  2<sup>10</sup> is 1024.</p>
var md = goldmark.New(superscript.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("Superscript")

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 Superscript 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