1 | ;
|
2 |
|
3 |
|
4 | module.exports = function () {
|
5 | return function (ast) {
|
6 | ast.children = ast.children.filter(function (node) {
|
7 | return node.type != 'paragraph' || node.children.some(function (node) {
|
8 | return node.type != 'text' || !/^\s*$/.test(node.value);
|
9 | });
|
10 | });
|
11 |
|
12 | return ast;
|
13 | };
|
14 | };
|