-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YellowBox: Fix Off-By-1 Content Rendering Bug
Summary: Fixes an off-by-one bug that was causing trailing single characters to be truncated from YellowBox. This snuck in during the revamp of YellowBox. Whoops! @public Reviewed By: TheSavior Differential Revision: D8607388 fbshipit-source-id: d0efac4dec361456ef58347a60eb1486a888624a
- Loading branch information
1 parent
8b6f1c3
commit 537a995
Showing
3 changed files
with
181 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
Libraries/YellowBox/Data/__tests__/__snapshots__/YellowBoxCategory-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`YellowBoxCategory renders a single substitution 1`] = ` | ||
Array [ | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"A" | ||
</Component>, | ||
] | ||
`; | ||
|
||
exports[`YellowBoxCategory renders content with no substitutions 1`] = ` | ||
Array [ | ||
<Component> | ||
A | ||
</Component>, | ||
] | ||
`; | ||
|
||
exports[`YellowBoxCategory renders multiple substitutions 1`] = ` | ||
Array [ | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"A" | ||
</Component>, | ||
<Component> | ||
</Component>, | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"B" | ||
</Component>, | ||
<Component> | ||
</Component>, | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"C" | ||
</Component>, | ||
] | ||
`; | ||
|
||
exports[`YellowBoxCategory renders substitutions with leading content 1`] = ` | ||
Array [ | ||
<Component> | ||
! | ||
</Component>, | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"A" | ||
</Component>, | ||
] | ||
`; | ||
|
||
exports[`YellowBoxCategory renders substitutions with trailing content 1`] = ` | ||
Array [ | ||
<Component | ||
style={ | ||
Object { | ||
"fontWeight": "bold", | ||
} | ||
} | ||
> | ||
"A" | ||
</Component>, | ||
<Component> | ||
! | ||
</Component>, | ||
] | ||
`; |