diff --git a/contentprovider.go b/contentprovider.go index 2c0644aa..5be5bdfe 100644 --- a/contentprovider.go +++ b/contentprovider.go @@ -872,6 +872,16 @@ func scoreKind(language string, kind string) float64 { case "type": factor = 10 } + case "Markdown", "markdown": + // Headers are good signal in docs, but do not rank as highly as code. + switch kind { + case "chapter": // # + factor = 4 + case "section": // ## + factor = 3 + case "subsection": // ### + factor = 2 + } } return factor * scoreKindMatch