mirror of
https://github.com/borbann-platform/end-of-semester-report.git
synced 2025-12-19 22:44:03 +01:00
18 lines
424 B
JavaScript
18 lines
424 B
JavaScript
import { match } from "@unified-latex/unified-latex-util-match";
|
|
import { replaceNode } from "@unified-latex/unified-latex-util-replace";
|
|
function deleteComments(ast) {
|
|
return replaceNode(ast, (node) => {
|
|
if (!match.comment(node)) {
|
|
return;
|
|
}
|
|
if (node.leadingWhitespace) {
|
|
return { type: "whitespace" };
|
|
}
|
|
return null;
|
|
});
|
|
}
|
|
export {
|
|
deleteComments
|
|
};
|
|
//# sourceMappingURL=index.js.map
|