Skip to content

Commit

Permalink
markdown: fix react-dom imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Wattenberger committed Aug 9, 2022
1 parent 87f8842 commit 742f8fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions blocks/file-blocks/markdown-edit/block-component-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ import React, {
useRef,
useState,
} from "react";
import ReactDOM from "react-dom/client";
import ReactDOMPlain from "react-dom";
import ReactDOM from "react-dom";
import { tw } from "twind";

interface BlockParams {
Expand Down Expand Up @@ -102,8 +101,6 @@ export const blockComponentWidget = ({
parentProps: FileBlockProps;
onDispatchChanges: (changes: TransactionSpec) => void;
}): Extension => {
console.log({ ReactDOM, ReactDOMPlain });

const blockComponentDecoration = (BlockParams: BlockParams) =>
Decoration.replace({
widget: new BlockWidget(BlockParams),
Expand Down
1 change: 0 additions & 1 deletion blocks/file-blocks/markdown-edit/copy-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ export const copy = (): Extension => {
// widgets.push(newDecoration.range(from));
} else if (type.name === "HTMLTag") {
const text = state.doc.sliceString(from, to);
console.log(text);
const linkRegexHtml =
/<a.*?href="(?<url>.*?)".*?>(?<text>.*?)[<\/a>]*/;
const result = linkRegexHtml.exec(text);
Expand Down

0 comments on commit 742f8fa

Please sign in to comment.