{"id":35000412,"url":"https://github.com/aliezzahn/rs-markdown-parser","last_synced_at":"2025-12-27T03:35:46.787Z","repository":{"id":291261979,"uuid":"977117209","full_name":"aliezzahn/rs-markdown-parser","owner":"aliezzahn","description":"A Node.js module for converting Markdown files to HTML using Rust","archived":false,"fork":false,"pushed_at":"2025-05-03T19:52:06.000Z","size":19,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T06:27:30.343Z","etag":null,"topics":["cargo","converter","html","loader","markdown","nodejs","npm","npm-package","parser","rust"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rs-markdown-parser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliezzahn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-03T13:13:42.000Z","updated_at":"2025-05-04T05:33:44.000Z","dependencies_parsed_at":"2025-05-03T13:50:40.039Z","dependency_job_id":"653b8ec0-89f3-4f53-9da8-762f36e9ad06","html_url":"https://github.com/aliezzahn/rs-markdown-parser","commit_stats":null,"previous_names":["aliezzahn/rs-markdown-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliezzahn/rs-markdown-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliezzahn%2Frs-markdown-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliezzahn%2Frs-markdown-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliezzahn%2Frs-markdown-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliezzahn%2Frs-markdown-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliezzahn","download_url":"https://codeload.github.com/aliezzahn/rs-markdown-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliezzahn%2Frs-markdown-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28071443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","converter","html","loader","markdown","nodejs","npm","npm-package","parser","rust"],"created_at":"2025-12-27T03:35:46.150Z","updated_at":"2025-12-27T03:35:46.769Z","avatar_url":"https://github.com/aliezzahn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🚀 rs-markdown-parser\n\nA blazing-fast Node.js module for converting Markdown to HTML — powered by Rust’s [`pulldown-cmark`](https://docs.rs/pulldown-cmark) and [Neon](https://neon-bindings.com/) for seamless Node integration.\n\n---\n\n## ✨ Features\n\n- ⚡ **Ultra-fast conversion** using Rust’s performance and `pulldown-cmark`.\n- 🧩 **Optional GitHub Flavored Markdown (GFM)** support — tables, footnotes, strikethrough, task lists, and heading attributes.\n- 📦 **ES module export** — easily import HTML in your frontend projects.\n- 🛡️ **TypeScript ready** — includes full type definitions.\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install rs-markdown-parser\n````\n\n\u003e 💡 *Note: To modify or rebuild the native module, follow the build instructions below.*\n\n---\n\n## 🛠️ Building the Module\n\nIf you're editing the Rust source or cross-compiling, use one of the following scripts:\n\n| Mode        | Command         | Notes                            |\n| ----------- | --------------- | -------------------------------- |\n| Debug       | `npm run debug` | Fast builds for development      |\n| Release     | `npm run build` | Optimized builds for production  |\n| Cross-build | `npm run cross` | Build for other target platforms |\n\nThe build will generate a native Node.js addon (`index.node`).\n\n---\n\n## 🚀 Usage\n\n### Importing the Module\n\n#### JavaScript\n\n```js\nconst { processMarkdown } = require(\"rs-markdown-parser\");\nconst { join } = require(\"path\");\n\nconst filePath = join(__dirname, \"test.md\");\nconst result = processMarkdown(filePath, false);\n\nconsole.log(result); // =\u003e export default `\u003chtml_content\u003e`;\n```\n\n#### TypeScript\n\n```ts\nimport { processMarkdown } from \"rs-markdown-parser\";\nimport { join } from \"path\";\n\nconst filePath: string = join(__dirname, \"test.md\");\nconst result: string = processMarkdown(filePath, false);\n\nconsole.log(result); // =\u003e export default `\u003chtml_content\u003e`;\n```\n\n---\n\n## 🧪 Example\n\n### Sample Markdown (`test.md`)\n\n```markdown\n# Hello, World!\n\nThis is a **Markdown** file.\n\n- Item 1\n- Item 2\n\n# Product Comparison\n\n| Product      | Price   | Features                   | In Stock |\n|--------------|---------|----------------------------|----------|\n| Phone A      | $299    | 64GB, 12MP Camera, 4G LTE  | Yes      |\n| Phone B      | $399    | 128GB, 48MP Camera, 5G     | No       |\n| Phone C      | $499    | 256GB, 108MP Camera, 5G    | Yes      |\n```\n\n### Output (ES Module String)\n\n---\n\n## 🧬 GitHub Flavored Markdown (GFM)\n\nEnable extended Markdown features with the `gfm` flag:\n\n```js\nconst result = processMarkdown(filePath, true);\n```\n\nSupported GFM features:\n\n* ✔️ Task lists\n* 📑 Footnotes\n* 🔡 Strikethrough (`~~text~~`)\n* 🧮 Tables\n* 🏷️ Heading attributes (`## Title {#id}`)\n\n---\n\n## 🔷 TypeScript Support\n\nThis module includes `index.d.ts` for full TypeScript support. To use:\n\n1. Ensure TypeScript is installed:\n\n   ```bash\n   npm install --save-dev typescript\n   ```\n\n2. Import the module as usual. Type definitions are automatically applied.\n\n---\n\n## 🧪 Development \u0026 Testing\n\n### Run tests:\n\n```bash\nnpm run test\n```\n\n### Rebuild after source changes:\n\n* Edit Rust: `src/lib.rs`\n* Edit Types: `index.d.ts`\n\nThen:\n\n```bash\nnpm run debug\n# or\nnpm run build\n```\n\n---\n\n## 📄 License\n\nMIT License — see [LICENSE](./LICENSE).\n\n---\n\n## 🤝 Contributing\n\nContributions welcome! Please open an issue or PR:\n\n👉 [GitHub Repository](https://github.com/aliezzahn/rs-markdown-parser)\n\n---\n\n## 🐞 Issues \u0026 Support\n\nFound a bug or need a feature?\n\n📬 Report it on [GitHub Issues](https://github.com/aliezzahn/rs-markdown-parser/issues)\n\n## 👥 Contributors\n\nThanks to these awesome people for their work on this project:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/aliezzahn\"\u003e\n        \u003cimg src=\"https://avatars.githubusercontent.com/u/164005474?v=4\" width=\"100px;\" alt=\"aliezzahn\" /\u003e\n        \u003cbr /\u003e\u003csub\u003e\u003cb\u003ealiezzahn\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/0xre2a\"\u003e\n        \u003cimg src=\"https://avatars.githubusercontent.com/u/90304241?v=4\" width=\"100px;\" alt=\"0xre2a\" /\u003e\n        \u003cbr /\u003e\u003csub\u003e\u003cb\u003e0xre2a\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://github.com/morihn\"\u003e\n        \u003cimg src=\"https://avatars.githubusercontent.com/u/191381570?v=4\" width=\"100px;\" alt=\"morihn\" /\u003e\n        \u003cbr /\u003e\u003csub\u003e\u003cb\u003emorihn\u003c/b\u003e\u003c/sub\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliezzahn%2Frs-markdown-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliezzahn%2Frs-markdown-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliezzahn%2Frs-markdown-parser/lists"}