Skip to content

Commit

Permalink
Self review
Browse files Browse the repository at this point in the history
  • Loading branch information
OEvgeny committed Dec 5, 2024
1 parent c9e6f63 commit 88adf65
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 3 deletions.
Binary file modified __tests__/html2/markdown/math/layout.spec.html.snap-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/html2/markdown/math/layout.spec.html.snap-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/html2/markdown/math/layout.spec.html.snap-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/bundle/src/codeHighlighter/ShikiComposer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { CodeHighlighterComposer, type HighlightCodeFn } from 'botframework-webchat-component/internal';
import React, { memo, ReactNode, useEffect, useState } from 'react';
import { type HighlighterCore } from 'shiki';

import createHighlighter from './shiki';
import { CodeHighlighterComposer, type HighlightCodeFn } from 'botframework-webchat-component/internal';

const createHighligtCodeWithShiki =
(shikiHiglighter: HighlighterCore): HighlightCodeFn =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import classNames from 'classnames';
import React, { Fragment, memo, ReactNode } from 'react';

import useCodeBlockTag from '../../../providers/CustomElements/useCodeBlockTagName';

type Props = Readonly<{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import mathRandom from 'math-random';
import React, { memo, useCallback, useMemo, type ReactNode } from 'react';

import useReactCodeBlockClass from './customElements/CodeBlock';
import { CodeBlockCopyButtonElement } from './customElements/CodeBlockCopyButton';
import CustomElementsContext from './private/CustomElementsContext';
import useReactCodeBlockClass from './customElements/CodeBlock';

type CustomElementsComposerProps = Readonly<{
children?: ReactNode | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ const createReactCodeBlockClass = ({

disconnectedCallback() {
this.#controller?.abort();
this.#controller = null;
}

highlight(...args: Parameters<HighlightCodeFn>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import classNames from 'classnames';
import React, { memo, useCallback, useState, type MouseEventHandler } from 'react';
import { useRefFrom } from 'use-ref-from';
import { useStateWithRef } from 'use-state-with-ref';

import testIds from '../../../testIds';
import wrapAsCustomElement from './wrapAsCustomElement';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo, useRef, useCallback, type DependencyList, type RefObject } from 'react';
import { useCallback, useMemo, useRef, type DependencyList, type RefObject } from 'react';

export type UpdateFn = () => any;
export type OnTrackFn = (cb: UpdateFn, signal: AbortSignal) => void;
Expand Down

0 comments on commit 88adf65

Please sign in to comment.