mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-24 21:56:05 +02:00
Add blackfriday/ExtensionsMask option.
This commit is contained in:
@@ -43,6 +43,7 @@ type Blackfriday struct {
|
||||
Fractions bool
|
||||
PlainIDAnchors bool
|
||||
Extensions []string
|
||||
ExtensionsMask []string
|
||||
}
|
||||
|
||||
// NewBlackfriday creates a new Blackfriday with some sane defaults.
|
||||
@@ -154,6 +155,11 @@ func getMarkdownExtensions(ctx *RenderingContext) int {
|
||||
flags |= flag
|
||||
}
|
||||
}
|
||||
for _, extension := range ctx.getConfig().ExtensionsMask {
|
||||
if flag, ok := blackfridayExtensionMap[extension]; ok {
|
||||
flags &= ^flag
|
||||
}
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user