@robinpath/markdown
v0.1.1
Published
> Markdown processing: convert to HTML, extract headings, links, images, code blocks, frontmatter, and tables
Keywords
Readme
@robinpath/markdown
Markdown processing: convert to HTML, extract headings, links, images, code blocks, frontmatter, and tables
Why use this module?
The markdown module lets you:
- Convert markdown to basic HTML
- Extract all headings with their levels
- Extract all links
- Extract all images
- Extract fenced code blocks
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/markdownQuick Start
No credentials needed — start using it right away:
markdown.extractHeadings $mdAvailable Functions
| Function | Description |
|----------|-------------|
| markdown.toHtml | Convert markdown to basic HTML |
| markdown.extractHeadings | Extract all headings with their levels |
| markdown.extractLinks | Extract all links |
| markdown.extractImages | Extract all images |
| markdown.extractCodeBlocks | Extract fenced code blocks |
| markdown.stripMarkdown | Strip all markdown formatting to plain text |
| markdown.extractFrontmatter | Parse YAML frontmatter from markdown |
| markdown.extractTodos | Extract task list items |
| markdown.tableToArray | Parse a markdown table into array of objects |
| markdown.wordCount | Count words in markdown (stripping formatting) |
Examples
Extract all headings with their levels
markdown.extractHeadings $mdExtract all links
markdown.extractLinks $mdExtract all images
markdown.extractImages $mdIntegration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/markdown";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
markdown.extractHeadings $md
`);Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
