Skip to content

Commit

Permalink
Add Blackfriday definition lists extension support
Browse files Browse the repository at this point in the history
  • Loading branch information
vbatoufflet authored and bep committed Jun 15, 2015
1 parent be6cf6a commit 82cc1ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ var blackfridayExtensionMap = map[string]int{
"headerIds": blackfriday.EXTENSION_HEADER_IDS,
"titleblock": blackfriday.EXTENSION_TITLEBLOCK,
"autoHeaderIds": blackfriday.EXTENSION_AUTO_HEADER_IDS,
"definitionLists": blackfriday.EXTENSION_DEFINITION_LISTS,
}

var stripHTMLReplacer = strings.NewReplacer("\n", " ", "</p>", "\n", "<br>", "\n", "<br />", "\n")
Expand Down Expand Up @@ -163,7 +164,8 @@ func getMarkdownExtensions(ctx *RenderingContext) int {
blackfriday.EXTENSION_TABLES | blackfriday.EXTENSION_FENCED_CODE |
blackfriday.EXTENSION_AUTOLINK | blackfriday.EXTENSION_STRIKETHROUGH |
blackfriday.EXTENSION_SPACE_HEADERS | blackfriday.EXTENSION_FOOTNOTES |
blackfriday.EXTENSION_HEADER_IDS | blackfriday.EXTENSION_AUTO_HEADER_IDS
blackfriday.EXTENSION_HEADER_IDS | blackfriday.EXTENSION_AUTO_HEADER_IDS |
blackfriday.EXTENSION_DEFINITION_LISTS
for _, extension := range ctx.getConfig().Extensions {
if flag, ok := blackfridayExtensionMap[extension]; ok {
flags |= flag
Expand Down

0 comments on commit 82cc1ac

Please sign in to comment.