Skip to content

Commit

Permalink
Mask type
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 8, 2020
1 parent f7805a4 commit 1d11162
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .storybook/playground.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import text from "../fixture/article.md";

const processor = unified()
.use(markdown, { commonmark: true })
.use(remarkToSlate as any);
.use(remarkToSlate);

export default {
title: "playground",
Expand Down
6 changes: 3 additions & 3 deletions src/remark-slate.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Node } from "unist";
import { Compiler } from "unified";
import * as slate from "slate";
import * as mdast from "./models/mdast";

const VOID_KEY = "void";

export default function plugin(this: { Compiler: Compiler }) {
this.Compiler = (compiler as any) as Compiler;
export default function plugin() {
// @ts-ignore
this.Compiler = compiler;

function compiler(node: Node) {
return remarkToSlate((node as any) as mdast.Root);
Expand Down

0 comments on commit 1d11162

Please sign in to comment.