Skip to content

Commit

Permalink
Merge pull request #55127 from shubham1206agra/revert-54983-fix/53145…
Browse files Browse the repository at this point in the history
…-handle-format-command

[CP Staging] Revert "Handle context menu format command"
  • Loading branch information
mountiny authored Jan 11, 2025
2 parents 7bbcdf5 + 3b4d853 commit a864b6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"dependencies": {
"@dotlottie/react-player": "^1.6.3",
"@expensify/react-native-live-markdown": "0.1.215",
"@expensify/react-native-live-markdown": "0.1.210",
"@expo/metro-runtime": "^4.0.0",
"@firebase/app": "^0.10.10",
"@firebase/performance": "^0.6.8",
Expand Down
12 changes: 0 additions & 12 deletions src/components/RNMarkdownTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@ type AnimatedMarkdownTextInputRef = typeof AnimatedMarkdownTextInput & MarkdownT

type RNMarkdownTextInputProps = Omit<MarkdownTextInputProps, 'parser'>;

function handleFormatSelection(selectedText: string, formatCommand: string) {
switch (formatCommand) {
case 'formatBold':
return `*${selectedText}*`;
case 'formatItalic':
return `_${selectedText}_`;
default:
return selectedText;
}
}

function RNMarkdownTextInputWithRef({maxLength, ...props}: RNMarkdownTextInputProps, ref: ForwardedRef<AnimatedMarkdownTextInputRef>) {
const theme = useTheme();

Expand All @@ -39,7 +28,6 @@ function RNMarkdownTextInputWithRef({maxLength, ...props}: RNMarkdownTextInputPr
}
ref(refHandle as AnimatedMarkdownTextInputRef);
}}
formatSelection={handleFormatSelection}
// eslint-disable-next-line
{...props}
/**
Expand Down

0 comments on commit a864b6b

Please sign in to comment.