Documentation
¶
Overview ¶
Package attributes is a extension for the goldmark (http://github.com/yuin/goldmark).
This extension adds support for block attributes in markdowns.
paragraph text with attributes
{#id .class option="value"}
Example ¶
package main
import (
"log"
"os"
attributes "github.com/mdigger/goldmark-attributes"
"github.com/yuin/goldmark"
)
func main() {
var source = []byte(`
text
{#id .class}
`)
var md = goldmark.New(attributes.Enable)
err := md.Convert(source, os.Stdout)
if err != nil {
log.Fatal(err)
}
}
Output: <p id="id" class="class">text</p>
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Enable = goldmark.WithExtensions(Extension)
Enable is a goldmark.Option with block attributes support.
View Source
var Extension goldmark.Extender = new(extension)
Extension is a goldmark.Extender with markdown block attributes support.
View Source
var KindAttributes = ast.NewNodeKind("BlockAttributes")
KindAttributes is a NodeKind of the attributes block node.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.