mirror of
https://github.com/luxfi/mcp.git
synced 2026-09-24 00:25:04 +00:00
docgen: quote frontmatter title/description (YAML-safe)
A synopsis containing a colon (e.g. "LP-103: https://…") broke unquoted YAML frontmatter and failed the next build. Quoting the values makes any colon/hash safe; inline() already maps internal quotes to apostrophes. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -65,7 +65,7 @@ func main() {
|
||||
func writeSurface(dir, name, blurb string, tools []mcp.Tool) {
|
||||
sort.Slice(tools, func(i, j int) bool { return tools[i].Name < tools[j].Name })
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "---\ntitle: %s\ndescription: %s\n---\n\n", name, inline(blurb))
|
||||
fmt.Fprintf(&b, "---\ntitle: \"%s\"\ndescription: \"%s\"\n---\n\n", name, inline(blurb))
|
||||
b.WriteString("{/* Generated from the MCP tool registry by tools/docgen — edit the tool, not this file. */}\n\n")
|
||||
fmt.Fprintf(&b, "%s\n\n", prose(blurb))
|
||||
for _, t := range tools {
|
||||
|
||||
Reference in New Issue
Block a user