Package Exports
- mdast-squeeze-paragraphs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdast-squeeze-paragraphs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mdast-squeeze-paragraphs
⚠️
This is an AST transformer for mdast syntax trees. A remark plugin has been split up into a different project.
Remove empty paragraphs from mdast tree.
Paragraph is considered empty if it is composed of whitespace characters only.
Example
var squeezeParagraphs = require('mdast-squeeze-paragraphs');
ast
//=> {
// "type": "root",
// "children": [
// {
// "type": "paragraph",
// "children": []
// },
// {
// "type": "paragraph",
// "children": [
// {
// "type": "text",
// "value": "foo"
// }
// ]
// }
// ]
// }
squeezeParagraphs(ast)
//=> {
// "type": "root",
// "children": [
// {
// "type": "paragraph",
// "children": [
// {
// "type": "text",
// "value": "foo"
// }
// ]
// }
// ]
// }API
squeezeParagraphs(ast)
Modifies AST in-place. Returns ast.
Related
- remark-squeeze-paragraphs — remark plugin wrapper.
Install
npm install mdast-squeeze-paragraphsLicense
MIT

