mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-27 08:44:41 +01:00
30 lines
965 B
Go
30 lines
965 B
Go
package pipelines
|
|
|
|
import "github.com/russross/blackfriday"
|
|
|
|
const blackfridayFlags = 0 |
|
|
blackfriday.HTML_USE_XHTML |
|
|
blackfriday.HTML_USE_SMARTYPANTS |
|
|
blackfriday.HTML_SMARTYPANTS_FRACTIONS |
|
|
blackfriday.HTML_SMARTYPANTS_DASHES |
|
|
blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
|
|
|
|
const blackfridayExtensions = 0 |
|
|
blackfriday.EXTENSION_NO_INTRA_EMPHASIS |
|
|
blackfriday.EXTENSION_TABLES |
|
|
blackfriday.EXTENSION_FENCED_CODE |
|
|
blackfriday.EXTENSION_AUTOLINK |
|
|
blackfriday.EXTENSION_STRIKETHROUGH |
|
|
blackfriday.EXTENSION_SPACE_HEADERS |
|
|
blackfriday.EXTENSION_HEADER_IDS |
|
|
blackfriday.EXTENSION_BACKSLASH_LINE_BREAK |
|
|
blackfriday.EXTENSION_DEFINITION_LISTS |
|
|
// added relative to commonExtensions
|
|
blackfriday.EXTENSION_AUTO_HEADER_IDS
|
|
|
|
func markdownRenderer(input []byte) []byte {
|
|
renderer := blackfriday.HtmlRenderer(blackfridayFlags, "", "")
|
|
return blackfriday.MarkdownOptions(input, renderer, blackfriday.Options{
|
|
Extensions: blackfridayExtensions})
|
|
}
|