Skip to content

Commit

Permalink
fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymczakJ committed Nov 18, 2024
1 parent 37fe064 commit 1de5ba2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {getElementHeight, getPlaceholderValue, isEventComposing, normalizeValue,
import {parseToReactDOMStyle, processMarkdownStyle} from './web/utils/webStyleUtils';
import {forceRefreshAllImages} from './web/inputElements/inlineImage';
import type {InlineImagesInputProps} from './commonTypes';
import {deepCompareMarkdownStyles} from './styleUtils';
import {deepEqualMarkdownStyles} from './styleUtils';

require('../parser/react-native-live-markdown-parser.js');

Expand Down Expand Up @@ -129,7 +129,7 @@ const MarkdownTextInput = React.forwardRef<MarkdownTextInput, MarkdownTextInputP
const flattenedStyle = useMemo(() => StyleSheet.flatten(style), [style]);
const prevMarkdownStyle = useRef<MarkdownStyle>();
const memoizedMarkdownStyle = useMemo(() => {
if (prevMarkdownStyle.current && deepCompareMarkdownStyles(prevMarkdownStyle.current, markdownStyle ?? {})) {
if (prevMarkdownStyle.current && deepEqualMarkdownStyles(prevMarkdownStyle.current, markdownStyle ?? {})) {
return prevMarkdownStyle.current;
}
return markdownStyle;
Expand Down
2 changes: 1 addition & 1 deletion src/styleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ function parseStringWithUnitToNumber(value: string | null): number {

export type {PartialMarkdownStyle};

export {mergeMarkdownStyleWithDefault, parseStringWithUnitToNumber, deepEqualMarkdownStyles as deepCompareMarkdownStyles};
export {mergeMarkdownStyleWithDefault, parseStringWithUnitToNumber, deepEqualMarkdownStyles};

0 comments on commit 1de5ba2

Please sign in to comment.