{"_id":"@beautifullife/markdown-splitter","_rev":"6-8086fc3b00b9b944a94e205447101084","name":"@beautifullife/markdown-splitter","dist-tags":{"latest":"1.3.3"},"versions":{"1.0.0":{"name":"@beautifullife/markdown-splitter","version":"1.0.0","keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","_id":"@beautifullife/markdown-splitter@1.0.0","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"homepage":"https://github.com/nrrb/markdown-splitter#readme","bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"bin":{"md-split":"cli.js"},"dist":{"shasum":"fcb7f86b6948b524298ef9a4eb19fd90247f3836","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.0.0.tgz","fileCount":7,"integrity":"sha512-PM/66Wtz5bwJis491JZLnGn2tnWcDGMir0XZg1iKIh8rXds5/LGKrAAxyeFHWPk+eJxagz0rJ3wSbxrHPeNKlA==","signatures":[{"sig":"MEYCIQCsUO+NmQied9ZWA6S8ozYHEjKZ5TK6BlKgLJt5iXx1lgIhAOVHFC5/e46XUpQsfTBn/rN16NtbSywja1DPZzKk2jXv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13367},"main":"md-splitter.js","engines":{"node":">=14.0.0"},"gitHead":"6b2b6dc4b41fd4d30566e8eab95db3ea57ac9334","scripts":{"test":"npm run test:clean && npm run test:split && npm run test:verify","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q ."},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"repository":{"url":"git+https://github.com/nrrb/markdown-splitter.git","type":"git"},"_npmVersion":"10.9.2","description":"Split a Markdown file into multiple linked HTML files with navigation","directories":{},"_nodeVersion":"22.14.0","dependencies":{"marked":"^4.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/markdown-splitter_1.0.0_1745461887200_0.8189582428347213","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@beautifullife/markdown-splitter","version":"1.2.0","keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","_id":"@beautifullife/markdown-splitter@1.2.0","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"homepage":"https://github.com/nrrb/markdown-splitter#readme","bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"bin":{"md-split":"cli.js"},"dist":{"shasum":"ecb00f001c079360589edbd07d5caefc9cf8600e","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.2.0.tgz","fileCount":7,"integrity":"sha512-kjjdwZlTE/+e4H9mcTVtIwDh3DMgNrfV6xM5W9z+p2v9zqMAKMAfTB/ofxeMz6vYx/nBXB65PZIDhlYtEbiARA==","signatures":[{"sig":"MEYCIQC0hhhqkx9MPvvOiosHvg4P1akntqwQ9vV3h9YT+9jTaQIhAJEWr83dvpRJLq/HQY2zABFC2cTrorRXgz63ggoBiul9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16406},"main":"md-splitter.js","engines":{"node":">=14.0.0"},"gitHead":"84705167bdf482e9b79d328b41c4433ecd1d5df5","scripts":{"test":"npm run test:clean && npm run test:split && npm run test:verify","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q ."},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"repository":{"url":"git+https://github.com/nrrb/markdown-splitter.git","type":"git"},"_npmVersion":"10.9.2","description":"Split a Markdown file into multiple linked HTML files with navigation","directories":{},"_nodeVersion":"22.14.0","dependencies":{"marked":"^4.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/markdown-splitter_1.2.0_1745463288268_0.34621081162864265","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@beautifullife/markdown-splitter","version":"1.3.0","keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","_id":"@beautifullife/markdown-splitter@1.3.0","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"homepage":"https://github.com/nrrb/markdown-splitter#readme","bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"bin":{"md-split":"cli.js"},"dist":{"shasum":"a7ee21f84c889dab1a86c2a8260fdcd62e20dbe3","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.3.0.tgz","fileCount":9,"integrity":"sha512-HoFR5DVAOwuHRuSKLcKa8SpRkf+6P9jfEiC4wmu8YK9LkmDDSOILWVhrAQgQHspbhhJxd85h0BF/fky1q0evKg==","signatures":[{"sig":"MEUCIQDdWrtn0JuYSW/o4IE83FFY0WD60mHFDbZbb8QF2PFkCAIgajPZJjHtjgYJkccIF7jG+UsU4TV3WRul7ugv5SLkkgk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22975},"main":"md-splitter.js","engines":{"node":">=14.0.0"},"gitHead":"7281ec061ca46ce0657bd29273d436bd1a1e54d9","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"mocha test/test-code-blocks.js","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q .","test:integration":"npm run test:clean && npm run test:split && npm run test:verify"},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"repository":{"url":"git+https://github.com/nrrb/markdown-splitter.git","type":"git"},"_npmVersion":"10.9.2","description":"Split a Markdown file into multiple linked HTML files with navigation","directories":{},"_nodeVersion":"22.14.0","dependencies":{"marked":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^26.1.0","mocha":"^11.1.0"},"_npmOperationalInternal":{"tmp":"tmp/markdown-splitter_1.3.0_1745465939692_0.6305258840443777","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@beautifullife/markdown-splitter","version":"1.3.1","keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","_id":"@beautifullife/markdown-splitter@1.3.1","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"homepage":"https://github.com/nrrb/markdown-splitter#readme","bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"bin":{"md-split":"cli.js"},"dist":{"shasum":"3e7848cdd99a2c1bb4a923c94b8e41652cd1a14f","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.3.1.tgz","fileCount":9,"integrity":"sha512-NPpJpTh8DJwqnYsbPKnNpTbEWhzOm23/xKPXsgksYB61fscf9zy1S0dD6jtULjofHaQGmrsmY8n7zsTbiOBzmA==","signatures":[{"sig":"MEUCIGq6rugtpgILmS8drJTEaLI/EixiD0Npm4E+Lad/R2j+AiEAwwL2np+wGQ8/bfq+BnGLSuc5JQHdRbNYOD/JkPf6B1k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23695},"main":"md-splitter.js","engines":{"node":">=14.0.0"},"gitHead":"9bd6f916457aa47c35aa07084c5d28209cb4e3e7","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"mocha test/test-code-blocks.js test/test-toc-links.js","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q .","test:integration":"npm run test:clean && npm run test:split && npm run test:verify"},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"repository":{"url":"git+https://github.com/nrrb/markdown-splitter.git","type":"git"},"_npmVersion":"10.9.2","description":"Split a Markdown file into multiple linked HTML files with navigation","directories":{},"_nodeVersion":"22.14.0","dependencies":{"marked":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^26.1.0","mocha":"^11.1.0"},"_npmOperationalInternal":{"tmp":"tmp/markdown-splitter_1.3.1_1745467269946_0.6267807244552077","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@beautifullife/markdown-splitter","version":"1.3.2","keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","_id":"@beautifullife/markdown-splitter@1.3.2","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"homepage":"https://github.com/nrrb/markdown-splitter#readme","bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"bin":{"md-split":"cli.js"},"dist":{"shasum":"f5bad658ac8e60a4a2a517c0bb3a6f0e8fed858b","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.3.2.tgz","fileCount":9,"integrity":"sha512-MlN+gE5RxGqfrLUUAA51nPRT4gYXCuf7MGvV+Ho/wGTVXIO0xrorz+7bJKOu+kSCyX6E/fa/nMpSekudAqBfXw==","signatures":[{"sig":"MEUCIC0CsNcYsJLkFP+Ijx8CkbgR0j1Zc8/WmDNbcPF1bhGVAiEAnRCkDLPj9+Knf1veK5yEhbbY9Wcq3ft1o5RUd1O4UhY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24718},"main":"md-splitter.js","engines":{"node":">=14.0.0"},"gitHead":"51924db7ed20397de38aa5324950f28bb2296890","scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"mocha test/test-code-blocks.js test/test-toc-links.js test/test-section-links.js","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q .","test:integration":"npm run test:clean && npm run test:split && npm run test:verify"},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"repository":{"url":"git+https://github.com/nrrb/markdown-splitter.git","type":"git"},"_npmVersion":"10.9.2","description":"Split a Markdown file into multiple linked HTML files with navigation","directories":{},"_nodeVersion":"22.14.0","dependencies":{"marked":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^26.1.0","mocha":"^11.1.0"},"_npmOperationalInternal":{"tmp":"tmp/markdown-splitter_1.3.2_1745467921913_0.04663291551643889","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@beautifullife/markdown-splitter","version":"1.3.3","description":"Split a Markdown file into multiple linked HTML files with navigation","main":"md-splitter.js","repository":{"type":"git","url":"git+https://github.com/nrrb/markdown-splitter.git"},"bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"homepage":"https://github.com/nrrb/markdown-splitter#readme","engines":{"node":">=14.0.0"},"bin":{"md-split":"cli.js"},"scripts":{"test":"npm run test:unit && npm run test:integration","test:unit":"mocha test/test-code-blocks.js test/test-toc-links.js test/test-section-links.js test/test-html-code-blocks.js","test:integration":"npm run test:clean && npm run test:split && npm run test:verify","test:clean":"rm -rf test-output","test:split":"node -e \"require('./md-splitter.js').splitMarkdownToHtml('README.md', 'test-output', 'Documentation')\"","test:verify":"test -f test-output/index.html && test -d test-output && find test-output -name '*.html' | grep -q ."},"keywords":["markdown","html","converter","documentation","splitter"],"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","dependencies":{"marked":"^4.0.0"},"devDependencies":{"jsdom":"^26.1.0","mocha":"^11.1.0"},"_id":"@beautifullife/markdown-splitter@1.3.3","gitHead":"ccba8ba784bbbfeb4b96c7a55713012cf88c2baf","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-E/vMERX0CauhUYKViFB7NglhTC0tjJ4jEra2F5D/lAyrB2AePQ9S07bLedF4+iLA/QdS6nSFOrrX7HRCOIEQ8w==","shasum":"e5eb959299907afd014204be4908fcd4dd544471","tarball":"https://registry.npmjs.org/@beautifullife/markdown-splitter/-/markdown-splitter-1.3.3.tgz","fileCount":7,"unpackedSize":20573,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID7vF8OQrSGe4AxYW/9fpAvQZxEKQ4lipyenoVr4SqwFAiEA4BG6jHI5ZM2d2yRvuae1u3Ux34hbaJ0ptrIoRxbeKeY="}]},"_npmUser":{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"},"directories":{},"maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/markdown-splitter_1.3.3_1745529122534_0.35399786776262476"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-24T02:31:27.122Z","modified":"2025-04-24T21:12:02.909Z","1.0.0":"2025-04-24T02:31:27.366Z","1.2.0":"2025-04-24T02:54:48.444Z","1.3.0":"2025-04-24T03:38:59.898Z","1.3.1":"2025-04-24T04:01:10.127Z","1.3.2":"2025-04-24T04:12:02.096Z","1.3.3":"2025-04-24T21:12:02.718Z"},"bugs":{"url":"https://github.com/nrrb/markdown-splitter/issues"},"author":{"name":"Nicholas Bennett","email":"nicholabennett.work@gmail.com"},"license":"MIT","homepage":"https://github.com/nrrb/markdown-splitter#readme","keywords":["markdown","html","converter","documentation","splitter"],"repository":{"type":"git","url":"git+https://github.com/nrrb/markdown-splitter.git"},"description":"Split a Markdown file into multiple linked HTML files with navigation","maintainers":[{"name":"beautifullife","email":"nicholasbennett.work@gmail.com"}],"readme":"# Markdown Splitter\n\nA tool that splits a Markdown file on header tags into a series of rendered HTML files. Each HTML file links to the previous and next file and includes a drop-down table of contents in the top menu bar.\n\n[![npm version](https://badge.fury.io/js/%40beautifullife%2Fmarkdown-splitter.svg)](https://www.npmjs.com/package/@beautifullife/markdown-splitter)\n\n[Usage](#usage)\n\n## Features\n\n- Split Markdown files into multiple HTML files based on heading tags\n- Each HTML file includes:\n  - Links to previous and next sections\n  - A dropdown table of contents with links to all sections\n  - Clean, responsive styling\n  - Syntax highlighting for code blocks (powered by Prism.js)\n  - Copy button for code blocks\n- Offline mode support (disable syntax highlighting for fully offline docs)\n- Automatic index.html that redirects to the first section\n\n## Installation\n\n### Option 1: Local Installation\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/nrrb/markdown-splitter.git\n   cd markdown-splitter\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Link the command globally:\n   ```\n   npm link\n   ```\n\n### Option 2: Install from npm\n\n```\nnpm install -g @beautifullife/markdown-splitter\n```\n\n## Usage\n\n### Command Line\n\n```\nmd-split [options] <input-file>\n```\n\nOptions:\n- `-i, --input <file>`: Input Markdown file\n- `-o, --output <dir>`: Output directory for HTML files (default: \"output-html\")\n- `-t, --title <title>`: Base title for HTML documents (default: \"Documentation\")\n- `--no-syntax-highlight`: Disable syntax highlighting in code blocks (default: enabled)\n  - When enabled (default), code blocks are syntax-highlighted using Prism.js loaded from a CDN\n  - Requires internet connection for viewers when enabled\n  - Disable this option for fully offline documentation\n  - Copy button functionality works in both modes\n- `-h, --help`: Show help information\n\nExample:\n```\nmd-split -i documentation.md -o docs-html -t \"API Documentation\"\n```\n\n### Programmatically\n\n```javascript\nconst { splitMarkdownToHtml } = require('markdown-splitter');\n\n// Split a Markdown file into multiple HTML files\nsplitMarkdownToHtml('input.md', 'output-dir', 'Document Title');\n```\n\n## Example Output\n\nAfter running the tool, you'll get:\n\n1. An `index.html` file that redirects to the first section\n2. Multiple HTML files named after each section ID (derived from heading text)\n3. Each HTML file contains:\n   - The section content\n   - Navigation links to previous/next sections\n   - A dropdown table of contents\n\nOpen the `index.html` file in your browser to start browsing the documentation.\n\n## Testing Code Blocks\n\nHTML code blocks are properly escaped and displayed as text. For example:\n\n```html\n<!-- Navigation menu -->\n<nav class=\"main-nav\">\n  <ul>\n    <li><a href=\"#home\">Home</a></li>\n    <li><a href=\"#about\">About</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n  </ul>\n</nav>\n\n<!-- Dangerous HTML that will be safely escaped -->\n<script>\n  alert('This will not execute!');\n</script>\n<style>\n  body { background: red; }\n</style>\n```\n\nThe HTML above will be displayed exactly as written, with all tags visible and properly escaped. No HTML will be interpreted or executed.\n\nOther language examples with syntax highlighting:\n\n```python\n# Python example\nclass DocumentSplitter:\n    def __init__(self, input_file):\n        self.input_file = input_file\n        \n    def split_sections(self):\n        with open(self.input_file, 'r') as f:\n            content = f.read()\n        return [section for section in content.split('##')]\n```\n\n```javascript\n// JavaScript example\nclass DocumentProcessor {\n  constructor(content) {\n    this.content = content;\n  }\n\n  async processMarkdown() {\n    const sections = this.content.split(/^##\\s/m);\n    return sections.map(section => this.parseSection(section));\n  }\n}\n```\n\n```bash\n# Shell script example\n#!/bin/bash\nfor file in *.md; do\n  echo \"Processing $file...\"\n  md-split --input \"$file\" --output \"${file%.md}-html\"\n  echo \"Done!\"\ndone\n```\n\n```text\nPlain text example:\n-----------------\nThis is just plain text\nwithout any special formatting\nor syntax highlighting.\n-------------------\n```\n\n```sql\n-- SQL example\nSELECT \n  documents.title,\n  sections.heading,\n  sections.content\nFROM documents\nJOIN sections ON sections.document_id = documents.id\nWHERE documents.type = 'markdown'\nORDER BY sections.position;\n```\n\nAll code blocks above will be syntax-highlighted using Prism.js (when enabled) and include a copy button for easy copying.\n\n## Requirements\n\n- Node.js 12.x or higher\n- npm or yarn\n\n## License\n\nMIT","readmeFilename":"README.md"}