Skip to content

A Hashtag extension for the goldmark markdown parser.

License

Notifications You must be signed in to change notification settings

13rac1/goldmark-hashtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goldmark-hashtag

goldmark-hashtag is an extension for the goldmark library to handle #example hashtags providing a Hashtag AST type.

Demo

This markdown:

# Hello goldmark-hashtag

#example

With the default configuration, becomes this HTML:

<h1>Hello goldmark-hashtag</h1>
<p><a href="/tags/example">#example</a></p>

Installation

go get github.com/13rac1/goldmark-hashtag

Usage

  markdown := goldmark.New(
    goldmark.WithExtensions(
      hashtag.Extension,
    ),
  )
  var buf bytes.Buffer
  if err := markdown.Convert([]byte(source), &buf); err != nil {
    panic(err)
  }
  fmt.Print(buf)
}

License

MIT

Author

Brad Erickson

About

A Hashtag extension for the goldmark markdown parser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages