summaryrefslogtreecommitdiffstats
path: root/helpers/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/content.go')
-rw-r--r--helpers/content.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/content.go b/helpers/content.go
index d42995519..4a46ecb77 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -108,6 +108,7 @@ type BlackFriday struct {
AngledQuotes bool
Fractions bool
HrefTargetBlank bool
+ NofollowLinks bool
SmartDashes bool
LatexDashes bool
TaskLists bool
@@ -124,6 +125,7 @@ func newBlackfriday(config map[string]interface{}) *BlackFriday {
"smartypantsQuotesNBSP": false,
"fractions": true,
"hrefTargetBlank": false,
+ "nofollowLinks": false,
"smartDashes": true,
"latexDashes": true,
"plainIDAnchors": true,
@@ -277,6 +279,10 @@ func (c *ContentSpec) getHTMLRenderer(defaultFlags int, ctx *RenderingContext) b
htmlFlags |= blackfriday.HTML_HREF_TARGET_BLANK
}
+ if ctx.Config.NofollowLinks {
+ htmlFlags |= blackfriday.HTML_NOFOLLOW_LINKS
+ }
+
if ctx.Config.SmartDashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES
}