Skip to main content

markdown_to_comment_blocks

Function markdown_to_comment_blocks 

Source
pub fn markdown_to_comment_blocks(body: &str) -> Vec<CommentBlock>
Expand description

Convert a markdown comment body into ClickUp’s comment rich-text array.

The supported subset:

  • fenced code blocks (```) → each line + a code-block newline;
  • - / * / + bullets → content + a bullet list newline;
  • - [ ] / - [x] task items → content + an unchecked/checked newline;
  • 1. ordered items → content + an ordered list newline;
  • ATX headings (#..######) → bold content + a leading glyph (no heading mark);
  • GFM tables → an aligned monospace code-block (comments have no table mark);
  • > blockquotes and --- horizontal rules;
  • inline `code`, **bold**, *italic*, and [text](url) links;
  • everything else → plain text.