Skip to content

Commit ee9e486

Browse files
committed
fix: code parsing edge case
1 parent 538b3df commit ee9e486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native-sdk/src/markdown/utils/generateMarkdownText.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const generateMarkdownText = (text?: string) => {
119119

120120
// Always replace \n``` with \n\n``` to force the markdown state machine to treat it as a separate block. Otherwise, code blocks inside of list
121121
// items for example were broken. We clean up the code block closing state within the rendering itself.
122-
resultText = resultText.replace(/\n```/g, '\n\n```');
122+
resultText = resultText.replace(/\n```/g, '\n\n```\n');
123123

124124
return resultText;
125125
};

0 commit comments

Comments
 (0)