123123213weqw opened a new pull request, #5841: URL: https://github.com/apache/rocketmq-dashboard/pull/5841
## Why `renderMarkdown` interpolated catalog values into the summary table verbatim. Catalog YAML is free text on the server side: a value containing a literal `|` (e.g. a capability or any future cell sourced from prose) added a phantom column, and a newline split the row in two — silently corrupting the generated `docs/generated/rmq-tools.md`. GitHub-flavored Markdown splits table cells on unescaped pipes even inside backtick code spans, so wrapping cells in backticks does not help. ## What changed - New `markdownTableCell` helper folds newlines/carriage returns to spaces and escapes `|` as `\\|`. - All summary-table cells (tool name, CLI resource/verb, risk, permission, joined capabilities) now go through it. ## Validation - New red-first test `TestRunMarkdownKeepsTableRowPerTool`: a capability list containing `CAP|PIPE` and `CAP\nLINE` previously produced a row ending early with a phantom empty column; it now asserts the row stays intact on one line with the escaped pipe and folded newline. - `go test ./internal/catalog/generate/...`, `go vet`, `gofmt` clean; `make catalog-verify` unaffected (the Go catalog is unchanged). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
