Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
Markdown editor guide

Markdown for GitHub Comments

Format GitHub issue and pull request comments with task lists, code blocks, mentions, and collapsible sections.

Direct answer

GitHub comments use GitHub Flavored Markdown: - [ ] for task lists, triple backticks with a language for code, > for quoting a reply, and a <details> block for collapsible sections. Draft the comment in a live editor first so the formatting is correct before you post it on an issue or pull request.

Open the Markdown Editor

When to use this

  • You are writing a GitHub issue, pull request, or review comment.
  • You want a task-list checklist reviewers can tick off.
  • You need a collapsible section to hide long logs or output.

Steps

  1. Use - [ ] for an unchecked task and - [x] for a checked one.
  2. Wrap code in triple backticks with a language name for syntax highlighting.
  3. Quote the message you are replying to with a > at the start of the line.
  4. Hide long output in a <details><summary>Label</summary> ... </details> block.
  5. Preview the comment in the editor, then paste it into the GitHub box.

Example

Markdown you type
## Review checklist

- [x] Tests pass
- [ ] Docs updated
- [ ] Changelog entry added

```bash
npm test
```

> Replying to your earlier question about coverage.

<details>
<summary>Full test log</summary>

```
42 passing
```

</details>
How it renders
Review checklist  (H2)

[x] Tests pass          (checkbox, ticked)
[ ] Docs updated        (checkbox, empty)
[ ] Changelog entry added

  npm test              (highlighted code box)

  | Replying to your earlier question about coverage.

> Full test log         (click to expand)
     42 passing

Common mistakes

  • Task list syntax needs a space inside the brackets: - [ ] and - [x], not -[] or -[x].
  • Leave a blank line before and inside a <details> block or the Markdown inside it will not render.
  • Indenting a code block with four spaces creates a different block; prefer triple backticks with a language.

FAQ

How do I add a checkbox list in a GitHub comment?
Start each line with - [ ] for an empty checkbox or - [x] for a checked one. GitHub turns them into clickable checkboxes on issues and pull requests.
How do I make a collapsible section on GitHub?
Wrap the content in <details><summary>Label</summary> and </details>. Keep a blank line after the summary so the Markdown inside still renders.
Does GitHub support the same Markdown as a README?
Comments and READMEs both use GitHub Flavored Markdown, so tables, task lists, and fenced code work in both. Draft either in a live editor to catch formatting issues first.

Related Markdown guides

Related Markdown editor guides