renderRawMarkdown renders the given raw markdown string to the given writer. Use for complete markdown content from tool calls that need no conversion.
(md string, w io.Writer, io *iostreams.IOStreams)
| 296 | // renderRawMarkdown renders the given raw markdown string to the given writer. |
| 297 | // Use for complete markdown content from tool calls that need no conversion. |
| 298 | func renderRawMarkdown(md string, w io.Writer, io *iostreams.IOStreams) error { |
| 299 | // Glamour doesn't add leading newlines when content is a complete |
| 300 | // markdown document. So, we must add the leading newline. |
| 301 | formatFunc := func(s string) string { |
| 302 | return fmt.Sprintf("\n%s\n\n", s) |
| 303 | } |
| 304 | |
| 305 | return renderMarkdownWithFormat(md, w, io, formatFunc) |
| 306 | } |
| 307 | |
| 308 | // renderMarkdownWithFormat renders the given markdown string to the given writer. |
| 309 | // If a formatFunc is provided, the md string is ran through it before |
no test coverage detected