AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

markdown-to-html

Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors.

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read github--markdown-to-html at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 16

references/code-blocks-to-html.md

Code Blocks to HTML

Fenced Code Blocks (No Language)

Markdown

function test() {
  console.log("notice the blank line before this function?");
}

Parsed HTML

<pre><code>
function test() {
  console.log("notice the blank line before this function?");
}
</code></pre>

GitHub Tip Callout

Markdown

> [!TIP]
> To preserve your formatting within a list, make sure to indent non-fenced code blocks by eight spaces.

Parsed HTML (GitHub-specific)

<blockquote class="markdown-alert markdown-alert-tip">
  <p><strong>Tip</strong></p>
  <p>To preserve your formatting within a list, make sure to indent non-fenced code blocks by eight spaces.</p>
</blockquote>

Showing Backticks Inside Code Blocks

Markdown

    ````
    ```
    Look! You can see my backticks.
    ```
    ````

Parsed HTML

    <pre><code>
    ```

    Look! You can see my backticks.

    ```
    </code></pre>

Syntax Highlighting (Language Identifier)

Markdown

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

Parsed HTML

<pre><code class="language-ruby">
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
</code></pre>

The language-ruby class is consumed by GitHub’s syntax highlighter (Linguist + grammar).

Summary: Syntax-Highlighting Rules (HTML-Level)

| Markdown fence | Parsed <code> tag | | -------------- | ------------------------------ | | js | `<code class="language-js">` | | html | <code class="language-html"> | | md | `<code class="language-md">` | | (no lang) | <code> |


HTML Comments (Ignored by Renderer)

<!-- Internal documentation comment -->
<!-- Internal documentation comment -->

Links

[About writing and formatting on GitHub](https://docs.github.com/...)
<a href="https://docs.github.com/...">About writing and formatting on GitHub</a>

Lists

* [GitHub Flavored Markdown Spec](https://github.github.com/gfm/)
<ul>
  <li>
    <a href="https://github.github.com/gfm/">GitHub Flavored Markdown Spec</a>
  </li>
</ul>

Diagrams (Conceptual Parsing)

Markdown

```mermaid
graph TD
  A --> B
```

Parsed HTML

<pre><code class="language-mermaid">
graph TD
  A --> B
</code></pre>

Closing Notes

  • No language-* class appears here because no language identifier was provided.
  • The inner triple backticks are preserved as literal text inside <code>.