Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18121,6 +18121,26 @@ exports[`Storyshots Markdown Preview 1`] = `
>
Testing: 😃 👍 :marioparty:
</Text>
<Text
accessibilityLabel="Fallback from new md to old"
numberOfLines={1}
style={
Array [
Object {
"backgroundColor": "transparent",
"fontFamily": "System",
"fontSize": 16,
"fontWeight": "400",
"textAlign": "left",
},
Object {
"color": "#2f343d",
},
]
}
>
Fallback from new md to old
</Text>
</View>
`;

Expand Down
2 changes: 1 addition & 1 deletion app/containers/markdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class Markdown extends PureComponent<IMarkdownProps, any> {
return null;
}

if (this.isNewMarkdown) {
if (this.isNewMarkdown && !preview) {
return (
<NewMarkdown
username={username}
Expand Down
18 changes: 18 additions & 0 deletions storybook/stories/Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ stories.add('Preview', () => (
username='rocket.cat'
/>
<Markdown msg='Testing: 😃 :+1: :marioparty:' getCustomEmoji={getCustomEmoji} theme={theme} numberOfLines={1} preview />
<Markdown
msg='Fallback from new md to old'
getCustomEmoji={getCustomEmoji}
theme={theme}
numberOfLines={1}
preview
md={[
{
type: 'PARAGRAPH',
value: [
{
type: 'PLAIN_TEXT',
value: 'This is Rocket.Chat'
}
]
}
]}
/>
</View>
));

Expand Down