Skip to content

Commit 90ac0cf

Browse files
committed
enable static build
1 parent 7ee49f5 commit 90ac0cf

File tree

4 files changed

+8113
-6385
lines changed

4 files changed

+8113
-6385
lines changed

plugins/highlight-first-heading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function highlightFirstHeading() {
77
}
88

99
function transform(tree: Node) {
10-
const heading = select("heading", tree);
10+
const heading = select("heading", tree as any);
1111

1212
if (heading) {
1313
heading.data = heading.data || {};

plugins/make-first-paragraph-big.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function makeFirstParagraphBig() {
77
}
88

99
function transform(tree: Node) {
10-
const paragraph = select("heading + paragraph", tree);
10+
const paragraph = select("heading + paragraph", tree as any);
1111

1212
if (paragraph) {
1313
paragraph.data = paragraph.data || {};

plugins/wrap-in-articles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export function wrapInArticles() {
1717

1818
const hasOnlyOneImage = (node: Node): node is Parent => {
1919
return (
20-
matches("paragraph", node) &&
20+
matches("paragraph", node as any) &&
2121
(node as Parent).children.length == 1 &&
22-
matches("image", (node as Parent).children[0])
22+
matches("image", (node as any).children[0])
2323
);
2424
};
2525

@@ -47,7 +47,7 @@ function transform(tree: Node) {
4747
for (let i = 0; i < (tree as Parent).children.length; i++) {
4848
const child = (tree as Parent).children[i];
4949

50-
if (matches("thematicBreak", child) || shouldNotWrap(child)) {
50+
if (matches("thematicBreak", child as any) || shouldNotWrap(child)) {
5151
currentArticle = null;
5252
children.push(child);
5353
} else if (hasOnlyOneImage(child)) {

0 commit comments

Comments
 (0)