Skip to content

Instantly share code, notes, and snippets.

@codekiln
Last active February 24, 2025 09:44
Show Gist options
  • Save codekiln/71f9497eaece99ba4d1c95b89d40b315 to your computer and use it in GitHub Desktop.
Save codekiln/71f9497eaece99ba4d1c95b89d40b315 to your computer and use it in GitHub Desktop.
How to correct markdown output with cursor
---
description: How to update markdown with fenced code blocks
globs: *.md, *.mdc
---
- # Rules to follow when outputting markdown
If you nest fenced code blocks in markdown, it will break the rendering. It's important that there is only one level of triple-backtick fenced code blocks in markdown output. Place your response in a triple-backtick fenced codeblock that's labeled with markdown, and use triple tilde fenced codeblocks for any inner code blocks, as per the CommonMark spec.
<EXAMPLE>
```markdown
Here's an example of the code:
~~~
$> git describe --tags
~~~
```
</EXAMPLE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment