diff --git a/src/components/InlineCodeBlock/WrappedText.tsx b/src/components/InlineCodeBlock/WrappedText.tsx index f0bb4e3ffd53..1c66cef234ed 100644 --- a/src/components/InlineCodeBlock/WrappedText.tsx +++ b/src/components/InlineCodeBlock/WrappedText.tsx @@ -31,6 +31,13 @@ function getTextMatrix(text: string): string[][] { return text.split('\n').map((row) => row.split(CONST.REGEX.SPACE_OR_EMOJI).filter((value) => value !== '')); } +/** + * Validates if the text contains any emoji + */ +function containsEmoji(text: string): boolean { + return CONST.REGEX.EMOJI.test(text); +} + function WrappedText({children, wordStyles, textStyles}: WrappedTextProps) { const styles = useThemeStyles(); @@ -53,7 +60,7 @@ function WrappedText({children, wordStyles, textStyles}: WrappedTextProps) { style={styles.codeWordWrapper} > - {colText} + {colText} ))} diff --git a/src/styles/index.ts b/src/styles/index.ts index 16861e36458c..3d4980a11780 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -2769,6 +2769,10 @@ const styles = (theme: ThemeColors) => paddingRight: 5, }, + codePlainTextStyle: { + ...codeStyles.codePlainTextStyle, + }, + fullScreenLoading: { backgroundColor: theme.componentBG, opacity: 0.8, diff --git a/src/styles/utils/codeStyles/index.android.ts b/src/styles/utils/codeStyles/index.android.ts index 1c2b80374fa1..1912f0ad7489 100644 --- a/src/styles/utils/codeStyles/index.android.ts +++ b/src/styles/utils/codeStyles/index.android.ts @@ -13,4 +13,8 @@ const codeTextStyle: CodeTextStyles = { lineHeight: 15, }; -export default {codeWordWrapper, codeWordStyle, codeTextStyle}; +const codePlainTextStyle: CodeTextStyles = { + lineHeight: 14.5, +}; + +export default {codeWordWrapper, codeWordStyle, codeTextStyle, codePlainTextStyle}; diff --git a/src/styles/utils/codeStyles/index.ios.ts b/src/styles/utils/codeStyles/index.ios.ts index 07a67f0f4a20..ec87e3b6427b 100644 --- a/src/styles/utils/codeStyles/index.ios.ts +++ b/src/styles/utils/codeStyles/index.ios.ts @@ -14,4 +14,8 @@ const codeTextStyle: CodeTextStyles = { lineHeight: 18, }; -export default {codeWordWrapper, codeWordStyle, codeTextStyle}; +const codePlainTextStyle: CodeTextStyles = { + lineHeight: 15, +}; + +export default {codeWordWrapper, codeWordStyle, codeTextStyle, codePlainTextStyle}; diff --git a/src/styles/utils/codeStyles/index.ts b/src/styles/utils/codeStyles/index.ts index 0ba8b2104867..45f669b0adaa 100644 --- a/src/styles/utils/codeStyles/index.ts +++ b/src/styles/utils/codeStyles/index.ts @@ -4,4 +4,5 @@ import {CodeTextStyles, CodeWordStyles, CodeWordWrapperStyles} from './types'; const codeWordWrapper: CodeWordWrapperStyles = {}; const codeWordStyle: CodeWordStyles = {}; const codeTextStyle: CodeTextStyles = {}; -export default {codeWordWrapper, codeWordStyle, codeTextStyle}; +const codePlainTextStyle: CodeTextStyles = {}; +export default {codeWordWrapper, codeWordStyle, codeTextStyle, codePlainTextStyle};