Move U+200E character to first fragment (#49534)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49534

Moving the U+200E character ensures that it gets the same font style as other fragments in the LogBox inspector. This solves an issue where the line height differential is causing issues on some out-of-tree platforms (e.g., Windows).

## Changelog

[Internal]

Reviewed By: shwanton

Differential Revision: D69857916

fbshipit-source-id: 5bc70dc0282f3ef9e9b2767ab8094e9923638e99
This commit is contained in:
Eric Rozell
2025-02-19 17:41:35 -08:00
committed by Facebook GitHub Bot
parent fc325cfee8
commit 41b597c736
+3 -2
View File
@@ -70,7 +70,9 @@ export default function Ansi({
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
const getText = (content, key) => {
if (key === 1) {
if (key === 0) {
return LRM + content;
} else if (key === 1) {
// Remove the vertical bar after line numbers
return content.replace(/\| $/, ' ');
} else if (key === 2 && commonWhitespaceLength < Infinity) {
@@ -86,7 +88,6 @@ export default function Ansi({
{parsedLines.map((items, i) => (
<View style={styles.line} key={i}>
<Text>
{LRM}
{items.map((bundle, key) => {
const textStyle =
bundle.fg && COLORS[bundle.fg]