Strip list item from backref lines
This commit is contained in:
parent
3d555226cf
commit
3f41a219f7
|
@ -88,7 +88,11 @@ func loadBackrefs(fp *FilePages, p string) (map[string][]Backref, error) {
|
|||
result[ref.Name] = nil
|
||||
}
|
||||
|
||||
links := renderLinks(strings.TrimLeft(ref.Link.Line, " *"))
|
||||
line := strings.TrimLeft(ref.Link.Line, " ")
|
||||
if line[0] == '*' && line[1] == ' ' {
|
||||
line = line[2:]
|
||||
}
|
||||
links := renderLinks(line)
|
||||
pageText := renderMarkdown2(links)
|
||||
|
||||
removeBrackets := func(r rune) rune {
|
||||
|
@ -102,7 +106,7 @@ func loadBackrefs(fp *FilePages, p string) (map[string][]Backref, error) {
|
|||
Name: ref.Name,
|
||||
Title: title,
|
||||
LineHTML: template.HTML(pageText),
|
||||
Line: strings.Map(removeBrackets, ref.Link.Line),
|
||||
Line: strings.Map(removeBrackets, ref.Link.Line),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user