(e: Entry)
| 264 | } |
| 265 | |
| 266 | function referencesOf(e: Entry): string[] { |
| 267 | const r = e.references; |
| 268 | if (!r) return []; |
| 269 | if (Array.isArray(r)) return r.filter((x): x is string => typeof x === 'string'); |
| 270 | if (typeof r === 'string') return [r]; |
| 271 | return []; |
| 272 | } |
| 273 | |
| 274 | const isHexId = (id: string) => /^[0-9a-f]{6}$/.test(id); |
| 275 | const slugify = (s: string) => |