goldmark-inline-attributes/README.md

563 B

goldmark-inline-attributes

GoldMark inline attributes extension.

This implements the bracketed_spans of pandoc.

[This is *some text*]{.class key="val"} outside text
<p><span class="class" key="val">This is <em>some text</em></span> outside text</p>
var md = goldmark.New(attributes.Enable)
var source = []byte("[Text]{#id .class1}\nother text")
err := md.Convert(source, os.Stdout)
if err != nil {
    log.Fatal(err)
}