mirror of https://github.com/perkeep/perkeep.git
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:
parent
26925d41a7
commit
cf7cd27d50
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue