(g *knowledge.Graph, label string)
| 191 | func tagID(s string) string { return "tag:" + graphSlug(s) } |
| 192 | |
| 193 | func addTag(g *knowledge.Graph, label string) { |
| 194 | label = strings.TrimSpace(label) |
| 195 | if label == "" { |
| 196 | return |
| 197 | } |
| 198 | g.AddNode(knowledge.Node{ID: tagID(label), Kind: knowledge.KindTag, Title: label}) |
| 199 | } |
| 200 | |
| 201 | // graphTitle turns a fact's content into a short node title (first line, capped). |
| 202 | func graphTitle(content string) string { |
no test coverage detected