{"_id":"md_parser","_rev":"39-84253aead293afd25e787ea56f7f1b70","name":"md_parser","description":"Parser for markdown","dist-tags":{"latest":"1.3.0"},"versions":{"0.1.0":{"name":"md_parser","version":"0.1.0","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"js-beautify":"~1.6.12"},"_id":"md_parser@0.1.0","_shasum":"d6b694a51117683f3fb67559159c75b165ac96ce","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"shasum":"d6b694a51117683f3fb67559159c75b165ac96ce","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-0.1.0.tgz","integrity":"sha512-SUQyNDyNgiskBhz1XNSxF9lVIIga5HnZSo6G3/EkRxHL1NEOl0n/5rZO0R6B5lag+zNB8/YPo4e7bEyxw3WFdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICvbj5FuYqBUWu1u+GFzfH715XiFjrPWEDh4tZf4jcImAiEAj1rClXdofKqbzk1ydP3PxPvahd7Kek76zQqH+nT2L7I="}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/md_parser-0.1.0.tgz_1493127159714_0.6126371428836137"},"deprecated":"Removed"},"1.0.1":{"name":"md_parser","version":"1.0.1","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"pretty":"^2.0.0"},"repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"git":"git+https://github.com/MauriceConrad/Markdown-Parser.git","bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"},"homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","_id":"md_parser@1.0.1","_shasum":"47b3377e6ab7722d6456c691d849d5ba6b99d0e1","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"shasum":"47b3377e6ab7722d6456c691d849d5ba6b99d0e1","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-1.0.1.tgz","integrity":"sha512-gNB9SLiyhL7Cgp9hEKq83IL0KUZ0db5l4pd/o4w+C6MV1b7XApxMoVszFEJtjh46TzbcX/aKfJtHZ+7MYnz1lA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGg1epFj6hR6nCzWX5ONeNpDODq2xVYHyWWBNJhMoccwAiB98VwN3F1zUGzlQtj6YHgwbbqo2ekNdmU1mJqM3qtU0w=="}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/md_parser-1.0.1.tgz_1494685437311_0.6132018093485385"}},"1.0.2":{"name":"md_parser","version":"1.0.2","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"pretty":"^2.0.0"},"git":"git+https://github.com/MauriceConrad/Markdown-Parser.git","bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"},"homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","_id":"md_parser@1.0.2","_shasum":"e5705b6cfcdc991f2738a3b00dc078c3e8f996da","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"shasum":"e5705b6cfcdc991f2738a3b00dc078c3e8f996da","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-1.0.2.tgz","integrity":"sha512-2dvu7g4A+VLqkNfrk2gmUUJHi1GzWaNDFaD9WASwdG8R585PfwFeLgI19/wO/muisAhjN/NnK5uCTejwrYtXFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVy7tlI9b72Skib4kdYUpArgd8dkJHOp8q2Ts34kEXVAIhAKv6IqJH7fKLuuk1kyJD20NWg6yGLLeJ9C/HBr2+0o3y"}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/md_parser-1.0.2.tgz_1495272094325_0.007100963499397039"}},"1.1.0":{"name":"md_parser","version":"1.1.0","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"pretty":"^2.0.0"},"git":"git+https://github.com/MauriceConrad/Markdown-Parser.git","bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"},"homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","_id":"md_parser@1.1.0","_npmVersion":"5.0.1","_nodeVersion":"8.0.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"integrity":"sha512-lCW4AYParr1HCPVyGAl3nC9LS2j+H+agLyvFED2meRUGpuLB2YtrSVwHBROHhIpmu82YXSrnVKM5RUXzuk59hw==","shasum":"663f68efa38203bc62e4abd020e7dd9de36bf4ad","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwnUHH9ZkqPoQ09t7dn85btI6f6rXwy7N8+kVnu94nmAiEAxEaIQLzTFT9B/5zqnkzFEaFkRuWvLXHs4/FPI3cLWdU="}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/md_parser-1.1.0.tgz_1496736371721_0.40848988317884505"}},"1.1.1":{"name":"md_parser","version":"1.1.1","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"pretty":"^2.0.0"},"git":"git+https://github.com/MauriceConrad/Markdown-Parser.git","bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"},"homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","_id":"md_parser@1.1.1","_npmVersion":"5.0.1","_nodeVersion":"8.0.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"integrity":"sha512-QWaYJF+0TJL7hPHZJoxsgh3sS9q/hPxBDc5TM7WmEgNDusdvgJwHcrCthZlMGl1/uTS/2/FwREGnSPLMMjShAw==","shasum":"1fd5e4119433681045894ea0740d46e9df1ee1a3","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-1.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAcZSJVnV6YSEHGWZ5rzh3H8wVp1+zrP/o5Kck8k3qbGAiEA4R/v6NcXj/oiPmssgeSQZtAF7sG5vTx2P1gEhxyUe4M="}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/md_parser-1.1.1.tgz_1501403926980_0.4105029327329248"}},"1.3.0":{"name":"md_parser","version":"1.3.0","description":"Parser for markdown","keywords":["markdown","parser"],"license":"ISC","author":{"name":"Maurice Conrad"},"main":"main.js","bin":{"md_parser":"cli.js"},"repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"pretty":"^2.0.0"},"git":"git+https://github.com/MauriceConrad/Markdown-Parser.git","bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"},"homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","_id":"md_parser@1.3.0","_npmVersion":"5.0.1","_nodeVersion":"8.0.0","_npmUser":{"name":"mauriceconrad","email":"conr.maur@googlemail.com"},"dist":{"integrity":"sha512-3pYnYbrL3DqcQ69w2hKncf/yaSYVEjrgmVkqPMqXIIs3tFh+hVVGOqa0DhjuKfC13RfV31mjRsTbnB6vRQ0fLA==","shasum":"1aeccbea0edb0f28866d9ac587a54d81a8b661f4","tarball":"https://registry.npmjs.org/md_parser/-/md_parser-1.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkSeGYrXwD29zA58UqeohDEZwM08UkNXe07TARO3SlVAiABJ1PcpG2sdKM991BO0iQadNm+PdHqnk1zaVkyohh29A=="}]},"maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/md_parser-1.3.0.tgz_1502005860986_0.7428023098036647"}}},"readme":"# Use in Node.js\n\nPlease note, that the parser isn't complete and still in progress! It's a part of a code competition ;-)\n\n```bash\nnpm install md_parser\n```\n\n# Use as command line tool (CLI)\n\n```bash\nnpm install md_parser -g\n```\n\n## CLI Usage\n\n```bash\nmd_parser <source> <outputFile>\n```\n1. The **1st** argument **(source)** is required. If it is a file, the file will be read.\n2. The **2nd** argument is optional. If it's given, it will be handled as an output file. If it's not given, the result will be printed in console.\n\n\n# Reference\n\n## Markdown Parsing Process\nThe parser parses the following elements in this way:\n* Bold text `**Bold**`\n* Italic text `*Italic*`\n* Striked text `~~Striked~~`\n* Paragraphs (Text that is seperated with line breaks)\n* Lists (a sub list needs two spaces) `* List item`\n  * Unsorted lists (circular) `* Item`\n  * Sorted lists (numeric) `1. Item`\n  * Alphabetic Lists lower and upper (lower/upper-alpha) `a. Item` / `A. Item`\n  * Roman Lists (upper-roman) `I. Item`\n* Tables (Table Syntax of Github Markdown)\n* Code Blocks (inline `<code></code>` and blocked `<pre><code></code></pre>`)\n* Links `[Link Text](http://maurice-conrad.eu)`\n* Images with optional width & height `![Image Name](https://image-url.com/image.png){width,height}` (Link syntax with an `!` prefix)\n* Abbreviations `?[This is an Abbreviation](I meant this!)` (Link syntax with an `?` prefix)\n* iFrames `$[Frame Title](http://maurice-conrad.eu)` (Link syntax with an `$` prefix)\n* Details\n  ```markdown\n  => Summary\n     Detailed information\n  ```\n\n\n\n### List parsing\n\nPlease make sure that the lists will all be parsed as ```<ul>``` containing the specific list style as CSS rule.\n**Why?**\nBecause of support for untypically lists like alphabetic and roman.\n\n## Require\n```javascript\nconst markdown = require('md_parser');\n```\n\n```javascript\n// Returns the following\n{\n  parse: [Function],\n  rules: [Array]\n}\n```\n\n## API\n\nThe ```md_parser```instance returns the method ```parse``` and the array ```rules```. This array contains the default parsing rules and can be customized. You can see more below.\n\n### Parse\n\n```javascript\nconst markdown = require('md_parser');\n\nvar markdownStr = \"# Title 1\\n## Title 2\\n\\nParagraph\"; // The string containing the markdown context\n\nmarkdown.parse(markdownStr, {\n  //rules: [], // Custom parsing rules. Don't use by default\n  validDocument: true, // Wether the returned string is a valid HTML document with DOCTYPE, head, body etc.\n  pretty: true, // Wether the result is pretty printed\n  disallowedFeatures: [ // Disallowed feature classes e.g. 'github', 'default', '3rd-party'... (Used to prevent bugs with not official features like abbreviations, iframes, details). The classes of a feature are defined its object in the rules array\n    //\"html5\",\n    //\"paragraph\"\n  ]\n});\n```\n\n### Parsing Rules\n\nThe parsing rules are an array with some regular expressions and functions.\n\nThe default rules are located in the file ```default-rules.js```. These rules are sometimes just regular expressions and sometimes more complex functions.<br>\nThe ```md_parser``` instance contains such an array with the default rules. If you call the ```parse``` method and you don't pass a custom array with rules as option, the rules array of the ```md_parser``` instance will be used.\n\n#### Parsing Rules Reference\n\nA rules array contains objects as rules. Every object represents one markdown element.\n<br>Have a look at the general structure of a rules array.\n\n```javascript\n// Rules array\n[\n  {...}, // Some other rules\n  {\n    name: \"name-of-element\", // The name of the element.\n    classes: [\"default\", \"my-class\", \"special-feauture-class\"],\n    query: '(.*)', // A regular expression string\n    replace: '<myReplacement>$1</myReplacement>', // The replacement for the regex\n    parse: function(str) {\n      // Special parsing function that returns the parsed string\n      return str;\n    }\n  },\n  {...} // Some other rules\n]\n```\n\n##### Example\n\nYou don't understand it?\n<br>For example, let's have a look at the parsing rule for a ```strong``` tag:\n\n```javascript\n{\n  name: \"bold\",\n  query: '\\\\*{2}([^\\\\*]*)\\\\*{2}', // Queries bold text\n  replace: '<strong>$1</strong>'\n}\n```\n\nAs you can see, a special `parse` function isn't required in this case. In some other cases there is no regular expression but just a special `parse` function within the rule object.\n","maintainers":[{"name":"mauriceconrad","email":"conr.maur@googlemail.com"}],"time":{"modified":"2022-06-19T17:15:56.556Z","created":"2017-04-25T13:32:41.647Z","0.1.0":"2017-04-25T13:32:41.647Z","0.1.1":"2017-04-25T13:34:42.440Z","0.1.2":"2017-04-25T13:36:06.759Z","0.1.3":"2017-04-25T13:38:52.766Z","0.1.4":"2017-04-25T15:29:18.434Z","0.1.5":"2017-04-25T15:30:34.164Z","0.1.6":"2017-04-25T15:31:06.162Z","0.1.7":"2017-04-25T15:32:31.188Z","0.2.0":"2017-04-30T13:15:33.207Z","0.2.1":"2017-04-30T13:16:35.265Z","0.2.2":"2017-05-01T11:54:38.694Z","0.2.3":"2017-05-11T20:27:03.706Z","0.2.4":"2017-05-13T11:55:57.739Z","1.0.0":"2017-05-13T14:08:49.275Z","1.0.1":"2017-05-13T14:23:59.269Z","1.0.2":"2017-05-20T09:21:35.337Z","1.1.0":"2017-06-06T08:06:12.695Z","1.1.1":"2017-07-30T08:38:47.913Z","1.3.0":"2017-08-06T07:51:01.904Z"},"keywords":["markdown","parser"],"author":{"name":"Maurice Conrad"},"license":"ISC","readmeFilename":"README.md","homepage":"https://github.com/MauriceConrad/Markdown-Parser#readme","repository":{"type":"git","url":"git://github.com/MauriceConrad/Markdown-Parser.git"},"bugs":{"url":"https://github.com/MauriceConrad/Markdown-Parser/issues"}}