Skip to content

Instantly share code, notes, and snippets.

@codekiln
Last active February 24, 2025 09:44
Show Gist options
  • Select an option

  • Save codekiln/71f9497eaece99ba4d1c95b89d40b315 to your computer and use it in GitHub Desktop.

Select an option

Save codekiln/71f9497eaece99ba4d1c95b89d40b315 to your computer and use it in GitHub Desktop.

Revisions

  1. codekiln revised this gist Feb 24, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions md-fenced-code-blocks.mdc
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ---
    description:
    globs:
    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.
  2. codekiln renamed this gist Feb 24, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. codekiln created this gist Feb 12, 2025.
    14 changes: 14 additions & 0 deletions markdown-output.mdc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ---
    description:
    globs:
    ---
    - # 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>