Skip to content

Commit

Permalink
y
Browse files Browse the repository at this point in the history
  • Loading branch information
Delusoire committed Sep 4, 2024
1 parent a7bf391 commit bb1d50a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions modules/style-smith/slate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import Prism from "https://esm.sh/prismjs";
import "https://esm.sh/prismjs/components/prism-css";
import { React } from "/modules/stdlib/src/expose/React.ts";
const { useCallback, useState } = React;
import { createEditor, Editor, Element, Node, NodeEntry, Range, Transforms } from "https://esm.sh/slate";
import { createEditor, Editor, Element, Node, NodeEntry, Range } from "https://esm.sh/slate";
import {
Editable,
ReactEditor,
RenderElementProps,
RenderLeafProps,
Slate,
Expand All @@ -19,7 +18,6 @@ import { css } from "https://esm.sh/@emotion/css";
import { CodeBlockElement } from "./custom-types.d.ts";
import { normalizeTokens } from "./normalize-tokens.ts";
import { Configlet, ConfigletManager } from "../src/configlet.ts";
import { deepMerge } from "/hooks/std/collections.ts";

const ParagraphType = "paragraph";
const CodeBlockType = "code-block";
Expand Down Expand Up @@ -54,11 +52,6 @@ const ElementWrapper = (props: RenderElementProps) => {
const editor = useSlateStatic();

if (element.type === CodeBlockType) {
const setLanguage = (language: string) => {
const path = ReactEditor.findPath(editor, element);
Transforms.setNodes(editor, { language }, { at: path });
};

return (
<div
{...attributes}
Expand Down

0 comments on commit bb1d50a

Please sign in to comment.