minor bugfixes and cleanup

This commit is contained in:
ston1th 2018-09-19 00:10:16 +02:00
commit 97d914bce4
26 changed files with 198 additions and 221 deletions

View file

@ -4,15 +4,14 @@ package index
import (
"fmt"
"html/template"
"os"
"git.giftfish.de/ston1th/gowiki/pkg/core"
"github.com/blevesearch/bleve"
)
const (
maxSearchResult = 100
)
const maxSearchResult = 101
type indexPage struct {
Title string `json:"title"`
@ -89,7 +88,7 @@ func (i *Index) Search(search string) (results []core.Result, err error) {
}
if fragField == "title" || fragField == "search" {
for _, f := range frags {
r.Text += f
r.HTML += template.HTML(f)
}
break
}