end-of-semester-report/node_modules/@unified-latex/unified-latex-util-comments
2025-05-14 16:14:35 +07:00
..
index.cjs initial commit 2025-05-14 16:14:35 +07:00
index.cjs.map initial commit 2025-05-14 16:14:35 +07:00
index.d.ts initial commit 2025-05-14 16:14:35 +07:00
index.js initial commit 2025-05-14 16:14:35 +07:00
index.js.map initial commit 2025-05-14 16:14:35 +07:00
package.json initial commit 2025-05-14 16:14:35 +07:00
README.md initial commit 2025-05-14 16:14:35 +07:00

unified-latex-util-comments

What is this?

Functions to help modify comments in a unified-latex Abstract Syntax Tree (AST).

When should I use this?

If you want to process comments in a unified-latex AST.

Install

npm install @unified-latex/unified-latex-util-comments

This package contains both esm and commonjs exports. To explicitly access the esm export, import the .js file. To explicitly access the commonjs export, import the .cjs file.

Functions

deleteComments(ast)

Returns a new AST with all comments removed. Care is taken to preserve whitespace. For example

x%
y

becomes xy but

x %
y

becomes x y

function deleteComments(ast: Ast.Ast): void;

Parameters

Param Type
ast Ast.Ast