Skip to content

Commit

Permalink
fix: keep empty line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
forivall authored and hosseinmd committed Jan 12, 2021
1 parent 4070ce8 commit e083299
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ export const getParser = (parser: any) =>
}
});

ast.comments = ast.comments.filter(({ value }) => value);
ast.comments = ast.comments.filter(
({ type, value }) =>
(type !== "CommentBlock" && type !== "Block") || value,
);

return ast;
};

0 comments on commit e083299

Please sign in to comment.