@unified-latex/unified-latex-util-align
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,12 +0,44 @@ | ||
export * from "./libs/parse-align-environment"; | ||
import * as Ast from '@unified-latex/unified-latex-types'; | ||
export declare function createMatchers(rowSepMacros: string[], colSep: string[]): { | ||
isRowSep: Ast.TypeGuard<Ast.Macro & { | ||
content: string; | ||
}>; | ||
isColSep: (node: Ast.Node) => boolean; | ||
isWhitespace: (node: Ast.Node) => boolean; | ||
isSameLineComment: (node: Ast.Node) => boolean | undefined; | ||
isOwnLineComment: (node: Ast.Node) => boolean; | ||
}; | ||
/** | ||
* ## What is this? | ||
* Parse the content of an align environment into an array of row objects. | ||
* Each row object looks like | ||
* ``` | ||
* { | ||
* cells: [...], | ||
* colSeps: [...], | ||
* rowSep: ..., | ||
* trailingComment: ... | ||
* } | ||
* ``` | ||
* `...` may be an ast node or `null`. | ||
* | ||
* Functions to parse an analyze "align" environments like `\begin{align}...\end{align}` or | ||
* `\begin{bmatrix}...\end{bmatrix}`. | ||
* | ||
* ## When should I use this? | ||
* | ||
* If you need to process the contents of an align environment for, e.g., pretty-printing. | ||
* @export | ||
* @param {[object]} ast | ||
* @param {string} [colSep=["&"]] | ||
* @param {string} [rowSepMacros=["\\", "hline", "cr"]] | ||
* @returns | ||
*/ | ||
//# sourceMappingURL=index.d.ts.map | ||
export declare function parseAlignEnvironment(ast: Ast.Node[], colSep?: string[], rowSepMacros?: string[]): Row[]; | ||
declare interface Row extends RowItems { | ||
rowSep: Ast.Macro | null; | ||
trailingComment: Ast.Comment | null; | ||
} | ||
declare interface RowItems { | ||
cells: Ast.Node[][]; | ||
colSeps: Ast.String[]; | ||
} | ||
export { } |
@@ -1,7 +0,3 @@ | ||
// libs/parse-align-environment.ts | ||
import { match } from "@unified-latex/unified-latex-util-match"; | ||
import { | ||
AlignEnvironmentPegParser, | ||
decorateArrayForPegjs | ||
} from "@unified-latex/unified-latex-util-pegjs"; | ||
import { decorateArrayForPegjs, AlignEnvironmentPegParser } from "@unified-latex/unified-latex-util-pegjs"; | ||
function createMatchers(rowSepMacros, colSep) { | ||
@@ -8,0 +4,0 @@ const isRowSep = match.createMacroMatcher(rowSepMacros); |
{ | ||
"name": "@unified-latex/unified-latex-util-align", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "Tools for manipulating unified-latex ASTs", | ||
@@ -8,5 +8,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@unified-latex/unified-latex-types": "^1.6.1", | ||
"@unified-latex/unified-latex-util-match": "^1.6.1", | ||
"@unified-latex/unified-latex-util-pegjs": "^1.6.1" | ||
"@unified-latex/unified-latex-types": "^1.7.0", | ||
"@unified-latex/unified-latex-util-match": "^1.7.0", | ||
"@unified-latex/unified-latex-util-pegjs": "^1.7.0" | ||
}, | ||
@@ -13,0 +13,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12556
7
93
1