{"_id":"@allenlee/remark-drop-paragraph","_rev":"3-205a371cdc4adcb84f5089f5377aac5b","name":"@allenlee/remark-drop-paragraph","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.3":{"name":"@allenlee/remark-drop-paragraph","version":"0.0.3","keywords":["markdown","mdast","mdx","remark","remark-plugin","unified","paragraph"],"author":{"name":"Allen Lee","email":"648384410li@gmail.com"},"license":"MIT","_id":"@allenlee/remark-drop-paragraph@0.0.3","maintainers":[{"name":"allenlee","email":"648384410li@gmail.com"}],"homepage":"https://github.com/cangSDARM/remark-drop-paragraph#readme","bugs":{"url":"https://github.com/cangSDARM/remark-drop-paragraph/issues"},"dist":{"shasum":"873a2d8324d98fae23c716f44474a994435dc3f5","tarball":"https://registry.npmjs.org/@allenlee/remark-drop-paragraph/-/remark-drop-paragraph-0.0.3.tgz","fileCount":6,"integrity":"sha512-uLBY2Si+2suTjhMtGXaPVfrEgv3kSumiYfBdE1KVQhZvNy3g2v+cHvTWtSZH2LE0k+QzZZZPO2UreYO5C7aG7A==","signatures":[{"sig":"MEYCIQDRtsthlELfqbixNG3+Vk60RvwbIEYoTMoWCaIjJUmnRQIhALlcOyymawT1MY4sAGbw1aXd56B7DrXhWqYO+0iMoEBm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKqWMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrW6A//X6LlsL7ccvqbIIS9WOO1x5O4C2S8L2t2Mf9NBOuM1wGiQNqG\r\n6elt8HePkT2mnQYOBqPfHc01uVM/ITtm+TbATp1wgMHeRqKVKeM6MdG9m6cM\r\nt1htNMEv2Hi2wGZCaFK8P7kBNu7rcM5H8H+tpMtO0+E85yb77ptc8V/EmdsP\r\nh/MRS6X6ii9JjlHWFzbLYnt+oPZZzSCQjeCigyKGgHEUVCSzM9UdkPRPODQp\r\nG0zHHG8P9Jk6M4mQK07gcpaGQVvPwBg47kCKsiUdmjRcNzyFEPJO18SBTPiN\r\nwE1mvSg/Wp8G+TxJQWbi5MKPbLNTD7tscyWEuYFOLg0HZs9oq1DT5bEjcG1O\r\n7fx/gJhjaN73SuGpftvw5HvZUKW52wM+DFb9yHHcBGz/nDqyT2NsBWypK9b4\r\nNZZioWUdvUehUBE1+7A7cGIhepLR39nxJykEjwHh84+GIj0C9tqpRX6JV6iX\r\n8sfTpwQTfZAe3pVsNt8t9pftiaWm8rvcSZkTNh6qCjhnkq/SVzn8s1w+jas2\r\nhHzjSpZPoZ9E2+UQuY8g3QcUC0ib1ucXsouEOefFuq5BEIDRHRos8w+XUxEb\r\nD1xmvtt45ENb22OmmEoLWvlKO8JsRPPh+Ffz9o+WToevBulGy8SqybzmEaIW\r\nTvGHEjx0WONMuzAy6MTPxv1a7opSFETk6bg=\r\n=GEYa\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","engines":{"node":">=14.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/cangSDARM","scripts":{"test":"echo \"no test yet\"","build":"tsc --noEmit false"},"_npmUser":{"name":"allenlee","email":"648384410li@gmail.com"},"repository":{"url":"git+https://github.com/cangSDARM/remark-drop-paragraph.git","type":"git"},"description":"A remark plugin for dropping unnecessary paragraph nodes","directories":{},"licenseText":"# MIT License\n\nCopyright © 2023 Allen Lee\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES\nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","dependencies":{"unist-util-visit":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","unified":"^10.1.2","prettier":"^2.0.0","typescript":"^4.0.0","@types/node":"*","@types/mdast":"^3.0.0","eslint-plugin-jsx-a11y":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-drop-paragraph_0.0.3_1680516491829_0.19669692254656668","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@allenlee/remark-drop-paragraph","version":"0.0.4","keywords":["markdown","mdast","mdx","remark","remark-plugin","unified","paragraph"],"author":{"name":"Allen Lee","email":"648384410li@gmail.com"},"license":"MIT","_id":"@allenlee/remark-drop-paragraph@0.0.4","maintainers":[{"name":"allenlee","email":"648384410li@gmail.com"}],"homepage":"https://github.com/cangSDARM/remark-drop-paragraph#readme","bugs":{"url":"https://github.com/cangSDARM/remark-drop-paragraph/issues"},"dist":{"shasum":"2e6781d0c3168b2d48ad3deb86a112ef2c44e34c","tarball":"https://registry.npmjs.org/@allenlee/remark-drop-paragraph/-/remark-drop-paragraph-0.0.4.tgz","fileCount":6,"integrity":"sha512-ccB1bKZ+o8iDaxaXNzgyryiIign27iRvWSE5Y5nZY8liQDsl73xdEiXCe4nPmp/5rqNON7Xy6qkGHpTjV01qZg==","signatures":[{"sig":"MEYCIQDhXQwXGWut2yCGFKjsntDiNgUyrXPLkwVcaCtboQFZLAIhAMpLu0b94eJYpq+epGZ4f/tjqNOg3ITLV+c8L6aK6k/w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkORHdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcbA/9Fn0u47YVY69TMZXBKY/Yrt0KYsIq65jpNe/bZw7MZdry40xB\r\nFgCHMNSZI2Bg8NqOCVJq/aarnSPe90yZCpXa5CC9RUnQ3NGmCQLI1O/xKqLU\r\n/hl/67pehcXUETov2+0hY+WhVHPYjfW47TbyUvfA6AkW4+S+EI3TQy2OFAAw\r\nUNoQvnVCtXOXCbEtP/IFJG0FfB43ioqI41RiAZZHjWIa7NQsiiFu1RRFxFyV\r\n7TyHdzkYZWg/Zbf7QDUw/DqlUe8nTC6wvBWoHy+kQ4HMt/vIiB2uQLdMW9Hn\r\njHkxgfukOvwjmR0s2o5oW+YehAea1SN+GQHm9hCSyMBYpndsxKLoZmCR4M0d\r\nEiNDHK892dbdn213st8ROb8J68KSYxgjSV6yRcRQVlZXJHa5tkVAOBUeAayY\r\nb4DDAgb5DjIbAx4opOpFjl23k4Vc267iXpJuqxICmHVddv0/vqznXAwnc482\r\nQNfIrCjdtycSkm3hDdy6a8NPe9pxNLK0Y8TvnB5B1/OjMGF4xXzoBmYusnCn\r\ncFqOjAkYPXJKNQz7QPVvIdPNeVNE+jJDguhkJELzYbDTZF4ysqhrDQeXE2UD\r\n8kE4zcbm85v0H3SCbdvYPDh8O23En8Su4a34qH2t8otS9ltaTQALCJleUdKR\r\neCWyZlXDlnCCUVf8K7A3hSn8ZdkWwkTMFhk=\r\n=Uijd\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","engines":{"node":">=14.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/cangSDARM","scripts":{"test":"echo \"no test yet\"","build":"tsc --noEmit false"},"_npmUser":{"name":"allenlee","email":"648384410li@gmail.com"},"repository":{"url":"git+https://github.com/cangSDARM/remark-drop-paragraph.git","type":"git"},"description":"A remark plugin for dropping unnecessary paragraph nodes","directories":{},"licenseText":"# MIT License\n\nCopyright © 2023 Allen Lee\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge, publish, distribute,\nsublicense, and/or sell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial\nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT\nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES\nOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","dependencies":{"unist-util-visit":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.0.0","unified":"^10.1.2","prettier":"^2.0.0","typescript":"^4.0.0","@types/node":"*","@types/mdast":"^3.0.0","eslint-plugin-jsx-a11y":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-drop-paragraph_0.0.4_1681461724836_0.18036673145276794","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@allenlee/remark-drop-paragraph","version":"0.0.5","description":"A remark plugin for dropping unnecessary paragraph nodes","author":{"name":"Allen Lee","email":"648384410li@gmail.com"},"license":"MIT","type":"module","exports":"./index.js","repository":{"type":"git","url":"git+https://github.com/cangSDARM/remark-drop-paragraph.git"},"bugs":{"url":"https://github.com/cangSDARM/remark-drop-paragraph/issues"},"homepage":"https://github.com/cangSDARM/remark-drop-paragraph#readme","funding":"https://github.com/sponsors/cangSDARM","keywords":["markdown","mdast","mdx","remark","remark-plugin","unified","paragraph"],"engines":{"node":">=14.0.0"},"scripts":{"build":"tsc --noEmit false","test":"echo \"no test yet\""},"dependencies":{"unist-util-visit":"^5.1.0"},"devDependencies":{"@types/mdast":"^4.0.4","@types/node":"*","eslint":"^8.0.0","eslint-plugin-jsx-a11y":"^6.10.2","prettier":"^3.8.3","typescript":"^5.8.2","unified":"^11.0.5"},"gitHead":"bddd21ef37ebd8c846ca96e935eb1fb090bb5a23","types":"./index.d.ts","_id":"@allenlee/remark-drop-paragraph@0.0.5","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-OanVr6hsht1P/QRo9RMkQx+xkWoFp+ftuSRZjvTHKe2yjw4tleGNpHP7BFbplKvAmzYmB1d4O5dkD+MSlPH2bA==","shasum":"19b924a47e9475c60fbb49c65e39bf836adc8fdd","tarball":"https://registry.npmjs.org/@allenlee/remark-drop-paragraph/-/remark-drop-paragraph-0.0.5.tgz","fileCount":5,"unpackedSize":8940,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allenlee%2fremark-drop-paragraph@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCE6y1ugQf6fnfsjUZYH1U3HnYZzS4ebJp7afGwODicIwIgDzrVb9rNi9yPKi1zrytYy1YuQBcfvOycfH9yCTgnG6U="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1612e5f0-1fa2-4730-8c98-ee43a06db0ed"}},"directories":{},"maintainers":[{"name":"allenlee","email":"648384410li@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-drop-paragraph_0.0.5_1780394682428_0.020005980892676245"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-03T10:08:11.745Z","modified":"2026-06-02T10:04:42.884Z","0.0.3":"2023-04-03T10:08:12.026Z","0.0.4":"2023-04-14T08:42:04.976Z","0.0.5":"2026-06-02T10:04:42.625Z"},"bugs":{"url":"https://github.com/cangSDARM/remark-drop-paragraph/issues"},"author":{"name":"Allen Lee","email":"648384410li@gmail.com"},"license":"MIT","homepage":"https://github.com/cangSDARM/remark-drop-paragraph#readme","keywords":["markdown","mdast","mdx","remark","remark-plugin","unified","paragraph"],"repository":{"type":"git","url":"git+https://github.com/cangSDARM/remark-drop-paragraph.git"},"description":"A remark plugin for dropping unnecessary paragraph nodes","maintainers":[{"name":"allenlee","email":"648384410li@gmail.com"}],"readme":"# @allenlee/remark-drop-paragraph\n\nA [remark](https://remark.js.org) plugin for dropping unnecessary paragraph nodes\n\nThe idea behind this plugin: https://github.com/mdx-js/mdx/issues/1170#issuecomment-725622285\n\n## Installation\n\n```sh\nnpm install @allenlee/remark-drop-paragraph\n```\n\n## Export\n\nsee the comments or source code for more information\n\n- inlineElement\n- blockElement\n- isJsxElement\n- DefaultOption\n- type RemarkDropParagraphOption\n\n## Options\n\n- `unwrapTags(paragraph's child per each)`<br/>\n  If you need to unwrap outer paragraph, use this\n  method to iterate through the paragraph's children nodes and unwrap when one returns true<br/>\n  default: `blockElement.includes(node.type) || isJsxElement(node, true)`\n- `noIncludeTags(paragraph's parent)`<br/>\n  If you need to drop internal paragraph, use this method\n  to iterate through the nodes that may contain paragraph, and drop the paragraph when it returns\n  true<br/>\n  default: `['mdxBlockElement'].includes(node.type) || isJsxElement(node, false)`\n\n## Usage\n\n### Source\n\n```ts\nconst remarkDropParagraph = require('@allenlee/remark-drop-paragraph');\n\nremark().use(remarkDropParagraph).process(`\n<JsxOut>\n\nparagraph1 in\n\n</JsxOut>\n\nparagraph2 out <JsxComponent />\n`);\n```\n\n### Yields\n#### Without this\n\n```html\n<JsxOut>\n<p>\n  paragraph1 in\n</p>\n</JsxOut>\n\n<p>paragraph2 out <JsxComponent /></p>\n```\n\n#### With this\n\n```html\n<JsxOut>\n  paragraph1 in\n</JsxOut>\n\n<p>paragraph2 out</p> <JsxComponent />\n```\n\n### License\n\n[MIT](LICENSE.md) @ [Allen Lee](https://github.com/cangSDARM)\n","readmeFilename":"README.md"}