{"_id":"@arothuis/markdown-it-fenced-divs","_rev":"1-f253010c0d4600a2fce8cfb459d7119a","name":"@arothuis/markdown-it-fenced-divs","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@arothuis/markdown-it-fenced-divs","version":"0.1.0","description":"A markdown-it plug-in for creating custom fenced divs.","keywords":["markdown","markdown-it","fenced divs","containers"],"repository":{"type":"git","url":"git+https://github.com/arothuis/markdown-it-fenced-divs.git"},"main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha --reporter-option maxDiffSize=0","test:cov":"nyc npm run test"},"mocha":{"spec":"test/**.test.js"},"nyc":{"reporter":["text","lcov","html"]},"author":{"name":"Alex Rothuis","email":"alex.rothuis@gmail.com"},"license":"MIT","devDependencies":{"chai":"^4.3.7","markdown-it":"^13.0.1","markdown-it-attrs":"^4.1.6","mocha":"^10.2.0","nyc":"^15.1.0"},"gitHead":"6219432b5303f1d049ddbb62c13036be4014e92c","bugs":{"url":"https://github.com/arothuis/markdown-it-fenced-divs/issues"},"homepage":"https://github.com/arothuis/markdown-it-fenced-divs#readme","_id":"@arothuis/markdown-it-fenced-divs@0.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-bFvXsLAkPbSPCU2uW7xnSM3rpIj2YVGz7ft5IzRG+WBERkmmxkK9FHy3DLq4VTro7P9z7/aYX0tX6dkY7jF6RA==","shasum":"39f2f663ee2e2f32e72055f760cf2babc9c37f78","tarball":"https://registry.npmjs.org/@arothuis/markdown-it-fenced-divs/-/markdown-it-fenced-divs-0.1.0.tgz","fileCount":5,"unpackedSize":6195,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0G8y8yTuF1ZWrSngcOj9rWSyD+t9S68w65TgPGgEvHwIgfZ/tTSZvK9MzQGhjdSwbYtrtPc/+oST6LnLj2BaQcGk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuMy9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdoxAAgJUqk+pp2XYxY8Rz894t0nCWsjY9e0+og5Q9takxZO6bSC5u\r\npHC3eamJoQ1z1+GDIPCGTwQsJpUe++Icig/bWzTGYEstynBDO3T4PQ7LSaLK\r\no3oZicr34tChAjw1F3hlV2C31jUauwb0+Q827tYDy1ns/778zmuF1zF4DHc7\r\n75MMdDj3tUrSLLj+8ZoTluEIWrR9Dvul5fU3xS8wisPolRtWm6pQelWeMzxs\r\nDSAl5NvDBHRNLaN/GuxC28+grEi6uVIvLENLb/QA/wNIFxvS4Ci+yVcR4d7R\r\nrqtYEx3hMqcQFzBOrCeXqWh0S1MItBGokOO2803z0/zjrddZ7O8kTuhJ/FlK\r\nt8b2ke/LQfaeBzunIt0oCOFQlb2va6UiaQKcoIiFYyWdq6Avr+q92YNo6QOl\r\nZEEJUDlL4KbLg064cFA3KQWedhiFvtHOT9iuNJOmDlwt5QyUXYoWaDoo3Wqs\r\nwcMM+i4r2Ao5kU7sRFsA8Vu+HmugayyevZ10twRUAgVdLT/kEay4kwh/mqFD\r\nUcMcTDcbl5T6pywGvtqYNkOAVotiyppPJlAR0ecp3nhHP0YMBqSkf1il9OkS\r\nnizP7/MYeJgIRq0qRuuQAt5aE2e+CHukkZBAoz9Uw7e1eF1z4BwlMP7RKmoU\r\nnXMzp/iGcxElUCsFzeupmcB1JKARFVU/rxc=\r\n=YVBi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"arothuis","email":"alex.rothuis@gmail.com"},"maintainers":[{"name":"arothuis","email":"alex.rothuis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-fenced-divs_0.1.0_1673055421592_0.7352196536405344"},"_hasShrinkwrap":false},"0.2.0":{"name":"@arothuis/markdown-it-fenced-divs","version":"0.2.0","description":"A markdown-it plug-in for creating custom fenced divs.","keywords":["markdown","markdown-it","fenced divs","containers"],"repository":{"type":"git","url":"git+https://github.com/arothuis/markdown-it-fenced-divs.git"},"main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha --reporter-option maxDiffSize=0","test:cov":"nyc npm run test"},"mocha":{"spec":"test/**.test.js"},"nyc":{"reporter":["text","lcov","html"]},"author":{"name":"Alex Rothuis","email":"alex.rothuis@gmail.com"},"license":"MIT","devDependencies":{"chai":"^4.3.7","markdown-it":"^13.0.1","markdown-it-attrs":"^4.1.6","mocha":"^10.2.0","nyc":"^15.1.0"},"gitHead":"45083dff0a9959ff4e7b08709ffcfb3d763f9df0","bugs":{"url":"https://github.com/arothuis/markdown-it-fenced-divs/issues"},"homepage":"https://github.com/arothuis/markdown-it-fenced-divs#readme","_id":"@arothuis/markdown-it-fenced-divs@0.2.0","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-BofWDzA8q6skyekZeI9anUemFZwIPURWYpqm1EkXSi//bjcuACm6snL+6a0eNv7ZLULMHpk3KUiBnnJjyt137g==","shasum":"fa254bc637e0812ff784cdc7deec91cb136af660","tarball":"https://registry.npmjs.org/@arothuis/markdown-it-fenced-divs/-/markdown-it-fenced-divs-0.2.0.tgz","fileCount":5,"unpackedSize":7217,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdR+fj6alUslcWoR/1fR6WGgdor5qID11QA6A9WZ9DsAiEAzfIP9V6vTxpY7/5NrKNUEooYZabnbhD7gC+xRj1cv54="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvEbKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF0w//c3U+dByFlJUrdkaBmrI1YORv3z5m7xaBCIzg0sBCD6VUksJ3\r\nibQYktWjUrOfXhH8pe1qxcdVNTsWzE0402BYFby09sz8oT9FFoMh/Zk+DeIM\r\n7LLKurVbLB16aBLzKmbGTgutFrsFNvS5bkWMEYzOo/Tnl+PXsHa0k5Z8o+cs\r\n3Dt5u6NPodvsVugfjHO+suWfmOR72c3ek2Qqx8m6szHtrnxcbfuHV+eNIgX5\r\ni+IUc1nQTyj76S9PN2jrofdjxlQ0sMy4q0LNbj4KsHvs21r5N//mOGfsNqx4\r\ns+zkCBZBtZQtntwMVwutkgqsNWIx5HF2q38p+Bm3POv/jlFBHDTOt5k3gUOB\r\nrbo1S994eoHuFq5TdNaz9rZokuzBYNGiNvMzXEIOcAs5z51+ipBzqPqS/Ekb\r\ny7T9gu+AaIdroOagICi7EMGkDanSlXJNrgFVMUqA4V9UW3NcHxRXxGoYgnzV\r\nBlPnUJbUziJU0Zzdm/tHhdUNihDBREfyC3LTqNxG/6hYuUBinhkpeUNplouL\r\nrgQ74zLhIrdUgDqxDGlZFLjromOu41wVlHdTXEwXtQOfK55CzAcMJ86Jqftg\r\n50+G8a7IDQuN88GXQt/zjP0ktLLJN0X46P2Q62UAX1gy7WnUdE8o3iNgPcwO\r\noBP7kbBFHWd6VubvwY+y2xXKET1xzsUMjYU=\r\n=J2PZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"arothuis","email":"alex.rothuis@gmail.com"},"maintainers":[{"name":"arothuis","email":"alex.rothuis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-fenced-divs_0.2.0_1673283274389_0.7027944344163037"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-07T01:37:01.516Z","0.1.0":"2023-01-07T01:37:01.744Z","modified":"2023-01-09T16:54:34.577Z","0.2.0":"2023-01-09T16:54:34.476Z"},"maintainers":[{"name":"arothuis","email":"alex.rothuis@gmail.com"}],"description":"A markdown-it plug-in for creating custom fenced divs.","homepage":"https://github.com/arothuis/markdown-it-fenced-divs#readme","keywords":["markdown","markdown-it","fenced divs","containers"],"repository":{"type":"git","url":"git+https://github.com/arothuis/markdown-it-fenced-divs.git"},"author":{"name":"Alex Rothuis","email":"alex.rothuis@gmail.com"},"bugs":{"url":"https://github.com/arothuis/markdown-it-fenced-divs/issues"},"license":"MIT","readme":"# @arothuis/markdown-it-fenced-divs\r\n[![Coverage Status](https://coveralls.io/repos/github/arothuis/markdown-it-fenced-divs/badge.svg?branch=main)](https://coveralls.io/github/arothuis/markdown-it-fenced-divs?branch=main)\r\n\r\nA [markdown-it](https://github.com/markdown-it/markdown-it) \r\nplug-in for creating custom fenced divs.\r\nBased on [markdown-it-container](https://github.com/markdown-it/markdown-it-container).\r\n\r\n## Features\r\nWe support the following:\r\n* Create arbitrary divs with classnames in Markdown\r\n* Nesting of named containers\r\n* Unnamed containers (nesting not supported)\r\n* Custom default classes\r\n* Integration with [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs),\r\nalso for unnamed containers\r\n\r\n## Installation\r\nInstall the plugin via NPM:\r\n```\r\nnpm i @arothuis/markdown-it-fenced-divs\r\n```\r\n\r\nAdd the plugin to markdown-it:\r\n```javascript\r\nconst markdownIt = require(\"markdown-it\");\r\nconst mdFenced = require(\"@arothuis/markdown-it-fenced-divs\");\r\n\r\nconst md = markdownIt();\r\n\r\n// With default configuration\r\nmd.use(mdFenced);\r\n```\r\n\r\n## Usage examples\r\nFor more examples, see: [tests](test/fixtures).\r\n\r\n### Basic use case\r\nInput:\r\n```markdown\r\nThis is outside of the block.\r\n\r\n::: my-block\r\nThis is inside the block.\r\n:::\r\n```\r\n\r\nOutput:\r\n```html\r\n<p>This is outside of the block.</p>\r\n<div class=\"my-block\">\r\n<p>This is inside the block.</p>\r\n</div>\r\n```\r\n\r\n### Nested containers\r\nInput:\r\n```markdown\r\nThis is outside of the block.\r\n\r\n::: outer-block\r\nThis is inside the outer block.\r\n\r\n::: inner-block\r\nThis is inside the inner block.\r\n:::\r\n:::\r\n```\r\n\r\nOutput:\r\n```html\r\n<p>This is outside of the block.</p>\r\n<div class=\"outer-block\">\r\n<p>This is inside the outer block.</p>\r\n<div class=\"inner-block\">\r\n<p>This is inside the inner block.</p>\r\n</div></div>\r\n```\r\n\r\n#### Careful with indentation!\r\nWe should be mindful of \r\nour indentation. As soon as we use \r\n4 spaces, our lines will be treated as\r\npart of a code block, which causes unexpected\r\nresults.\r\n\r\n## Customization\r\nThe following properties can be customized:\r\n```javascript\r\nconst options = {\r\n    // Class to add to each fenced div element (for easy generic styling)\r\n    defaultClass: \"\",\r\n};\r\n\r\n\r\n// Add plugin with custom options\r\nmd.use(mdFenced, options);\r\n```\r\n","readmeFilename":"README.md"}