{"name":"remove-markdown","version":"0.5.0","description":"Remove Markdown formatting from text","main":"index.js","scripts":{"test":"mocha -R spec test/remove-markdown.js"},"repository":{"type":"git","url":"git+https://github.com/stiang/remove-markdown.git"},"keywords":["markdown"],"author":{"name":"Stian Grytøyr"},"license":"MIT","bugs":{"url":"https://github.com/stiang/remove-markdown/issues"},"homepage":"https://github.com/stiang/remove-markdown","devDependencies":{"chai":"^4.0.2","mocha":"^2.1.0","should":"^5.0.0"},"gitHead":"d8b8f58a9d4e859a914707bc75cae55cdf5c47d1","_id":"remove-markdown@0.5.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","dist":{"integrity":"sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==","shasum":"a596264bbd60b9ceab2e2ae86e5789eee91aee32","tarball":"http://registry-npm.ywwl.com/remove-markdown/download/remove-markdown-0.5.0.tgz","fileCount":6,"unpackedSize":20675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEURayxWgiWobz9UaYggvHqOqxYWdYkQY8yP4tQW1mcMAiEA5jD9Lw86uXAefBDIaRVkHGBIDEe7uDbeVbZgkHLlDww="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaOidACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbYw//aHwDsc+q5mxZpRaIDGD5A0MK02RD/qEtFRLBXbsZhQqVVuGq\r\n1dDpUOFneGyD8qe1KnHoXqAtUvhY9GuCkGjhtCrIHta6L26aJYPmBRqZQIOn\r\nmdLCryk0dvOvHcAFA1aQHxG8fr7K6pO9Zm/9HO8aG0YqxgQU7fk7neDiBCTd\r\nUGpmhvbkrXvV1BwwlfIV1RA5tRHkJpQqSUmWfonRjXnu3q2D72rm8k3S9TDp\r\nuSVDgXABTFElzEa7XbMP1v//E0LT/rl0YTbb/v0imeZo4ERxNKQjmLANYJKJ\r\nDxk0ivj0q6O/sjKiw12+iNsjDBdNd/WaZY5SUtYKAbfti2jNm8d432mREGi5\r\nPksZSZGyxwUZU275SHte3Tjl7Q2EsLdrXTQ1TAo2bndlI1Dw90pcy2pPbOKl\r\nVBXhvJc9QFPECTTTpLgg/Bx/P0y5ZiAUBTMr4T1ID54VR2+9x6NhJfn6BFnZ\r\nB3C2AbCuNJkoxjH5/NrWOWXNiFKt8cO5zhcEALDrGnISlp8M3xxs2yMPLmTn\r\n3+GS8M0vkB6fJZw2NHiKHZb8tcqpKUG5xrQaQ43l6G/Ud/as+wdxM+EjH/G1\r\nv97UEfrHbZ0d19Ye2wtoRFoUmaky7v/BYTlHWz3cuBGJprKDgpv0/hdD1eKG\r\neXhRn+eG9GjO1Q+I+UjSbKxBXg/D83aD81Y=\r\n=Y7rd\r\n-----END PGP SIGNATURE-----\r\n","size":6606,"noattachment":false,"key":"/remove-markdown/-/remove-markdown-0.5.0.tgz"},"_npmUser":{"name":"stiang","email":"stian@grytoyr.net"},"directories":{},"maintainers":[{"name":"stiang","email":"stian@grytoyr.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remove-markdown_0.5.0_1651042461195_0.5676214850722772"},"_hasShrinkwrap":false,"readme":"[![CircleCI](https://circleci.com/gh/stiang/remove-markdown.svg?style=svg&circle-token=cac2feef7dc90e6b8578aec361be369412be1c6a)](https://circleci.com/gh/stiang/remove-markdown)\n\n## What is it?\n**remove-markdown** is a node.js module that will remove (strip) Markdown formatting from text.\n*Markdown formatting* means pretty much anything that doesn’t look like regular text, like square brackets, asterisks etc.\n\n## When do I need it?\nThe typical use case is to display an excerpt from some Markdown text, without any of the actual Markdown syntax - for example in a list of posts.\n\n## Installation\n\n```\nnpm install remove-markdown\n```\n\n## Usage\n```js\nconst removeMd = require('remove-markdown');\nconst markdown = '# This is a heading\\n\\nThis is a paragraph with [a link](http://www.disney.com/) in it.';\nconst plainText = removeMd(markdown); // plainText is now 'This is a heading\\n\\nThis is a paragraph with a link in it.'\n```\n\nYou can also supply an options object to the function. Currently, the following options are supported:\n\n```js\nconst plainText = removeMd(markdown, {\n  stripListLeaders: true , // strip list leaders (default: true)\n  listUnicodeChar: '',     // char to insert instead of stripped list leaders (default: '')\n  gfm: true                // support GitHub-Flavored Markdown (default: true)\n  useImgAltText: true      // replace images with alt-text, if present (default: true)\n});\n```\n\nSetting `stripListLeaders` to false will retain any list characters (`*, -, +, (digit).`).\n\n## TODO\nPRs are very much welcome. Here are some ideas for future enhancements:\n\n* Allow the RegEx expressions to be customized per rule\n* Make the rules more robust, support more edge cases\n* Add more (comprehensive) tests\n\n## Credits\nThe code is based on [Markdown Service Tools - Strip Markdown](http://brettterpstra.com/2013/10/18/a-markdown-service-to-strip-markdown/) by Brett Terpstra.\n\n## Author\nStian Grytøyr\n","publish_time":1651042461365,"_cnpm_publish_time":1651042461365,"dist-tags":{"latest":"0.8.0","next":"0.7.0-rc.1"}}