website: include blackfriday's CommonExtensions

WithExtension() options passed to Run() are not additive, so the
AutoHeadingIDs extension must be ORed together with CommonExtensions.

Fixes #1046

Change-Id: Ib0984397b251ff9277b7b2e4dac79add962709b7
This commit is contained in:
Will Norris 2018-01-30 04:54:48 +00:00
parent 26925d41a7
commit cf7cd27d50
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ func serveFile(w http.ResponseWriter, r *http.Request, relPath, absPath string)
}
// AutoHeadingIDs is the only extension missing
data = blackfriday.Run(data, blackfriday.WithExtensions(blackfriday.AutoHeadingIDs))
data = blackfriday.Run(data, blackfriday.WithExtensions(blackfriday.CommonExtensions|blackfriday.AutoHeadingIDs))
title := ""
if m := h1TitlePattern.FindSubmatch(data); len(m) > 1 {