New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

n8n-nodes-markdown-code-block-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-nodes-markdown-code-block-parser

n8n node to parse all code blocks from Markdown text

latest
Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

n8n-nodes-markdown-code-block-parser

n8n community node to parse all code blocks from Markdown text.

Features

  • Parse all code blocks from Markdown text
  • Extract code content, language identifier, line numbers, and fence type
  • Support both ``` and ~~~ fence types
  • Filter options for empty blocks and blocks without language

Installation

npm install n8n-nodes-markdown-code-block-parser

Usage

  • Add the "Markdown Code Block Parser" node to your workflow
  • Enter or paste your Markdown text in the "Markdown Text" field
  • Configure output options:
    • Output Field Name: Name of the output field (default: codeBlocks)
    • Include Empty Blocks: Whether to include empty code blocks
    • Include Blocks Without Language: Whether to include code blocks without language identifier

Output

The node outputs an array of code blocks, each containing:

  • code: The code content
  • language: Language identifier (e.g., javascript, python) or null
  • index: Index in the document (0-based)
  • fence: Fence type used (``` or ~~~)
  • startLine: Starting line number in the original Markdown
  • endLine: Ending line number in the original Markdown

Example

Input Markdown:

# Example

```javascript
console.log('Hello');
```

```python
print('World')
```

Output:

{
  "codeBlocks": [
    {
      "code": "console.log('Hello');",
      "language": "javascript",
      "index": 0,
      "fence": "```",
      "startLine": 3,
      "endLine": 5
    },
    {
      "code": "print('World')",
      "language": "python",
      "index": 1,
      "fence": "```",
      "startLine": 7,
      "endLine": 9
    }
  ]
}

License

MIT

Keywords

n8n-community-node-package

FAQs

Package last updated on 22 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts