diff --git a/native/markdown/rules.react.js b/native/markdown/rules.react.js --- a/native/markdown/rules.react.js +++ b/native/markdown/rules.react.js @@ -180,6 +180,21 @@ ), }, + spoiler: { + order: SimpleMarkdown.defaultRules.paragraph.order - 1, + match: SharedMarkdown.matchSpoiler(), + parse: SharedMarkdown.parseSpoiler, + // eslint-disable-next-line react/display-name + react: ( + node: SharedMarkdown.SingleASTNode, + output: SharedMarkdown.Output, + state: SharedMarkdown.State, + ) => ( + + {output(node.content, state)} + + ), + }, inlineCode: { ...SimpleMarkdown.defaultRules.inlineCode, // eslint-disable-next-line react/display-name diff --git a/native/markdown/styles.js b/native/markdown/styles.js --- a/native/markdown/styles.js +++ b/native/markdown/styles.js @@ -11,6 +11,11 @@ color: 'markdownLink', textDecorationLine: 'underline', }, + spoiler: { + // Placeholder, in order to check that the spoiler is rendered correctly. + // ENG-1983 will add the actual styling for spoiler text + color: 'red', + }, italics: { fontStyle: 'italic', },