Skip to content

Commit

Permalink
Merge pull request #51 from siefkenj/alone-begin
Browse files Browse the repository at this point in the history
Build order adjustment
  • Loading branch information
siefkenj authored Oct 2, 2023
2 parents f311e5f + 3589d00 commit 7c524b9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 57 deletions.
53 changes: 4 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"workspaces": [
"./packages/unified-latex-util-pegjs",
"./packages/unified-latex-util-*",
"./packages/*"
],
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions packages/unified-latex-prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"@unified-latex/unified-latex-util-print-raw": "^1.4.2",
"@unified-latex/unified-latex-util-trim": "^1.4.2",
"@unified-latex/unified-latex-util-visit": "^1.4.2",
"prettier": "^3.0.3",
"unified": "^10.1.2"
"prettier": "^3.0.3"
},
"files": [
"dist/**/*.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type * as Ast from "@unified-latex/unified-latex-types";
import { unifiedLatexToHast } from "@unified-latex/unified-latex-to-hast";
import { PluginOptions as HtmlLikePluginOptions } from "@unified-latex/unified-latex-to-hast";
import rehypeRemark, { Options as RehypeRemarkOptions } from "rehype-remark";
import { VFile } from "vfile";
import { defaultHandlers } from "./remark-handlers-defaults";

export type PluginOptions = HtmlLikePluginOptions & RehypeRemarkOptions;
Expand All @@ -22,11 +21,12 @@ export const unifiedLatexToMdast: Plugin<
const handlers = Object.assign({}, defaultHandlers, options?.handlers);
options = Object.assign({}, options, { handlers });

return (tree: Ast.Root, file: VFile) => {
return (tree: Ast.Root, file) => {
const mdast = unified()
.use(unifiedLatexToHast, options)
.use(rehypeRemark, options)
.runSync(tree, file as any) as Mdast.Root;
return mdast;
// @ts-ignore
.runSync(tree, file);
return mdast as Mdast.Root;
};
};
3 changes: 1 addition & 2 deletions packages/unified-latex-to-mdast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"hast-util-to-string": "^3.0.0",
"rehype-remark": "^10.0.0",
"remark-stringify": "^10.0.3",
"unified": "^10.1.2",
"vfile": "^6.0.1"
"unified": "^10.1.2"
},
"devDependencies": {
"hast-util-to-html": "^8.0.4",
Expand Down

0 comments on commit 7c524b9

Please sign in to comment.