Page MenuHomePhabricator

D5347.diff
No OneTemporary

D5347.diff

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
@@ -181,6 +181,26 @@
</Text>
),
},
+ spoiler: {
+ order: SimpleMarkdown.defaultRules.paragraph.order - 1,
+ match: SimpleMarkdown.inlineRegex(SharedMarkdown.spoilerRegex),
+ parse(
+ capture: SharedMarkdown.Capture,
+ parse: SharedMarkdown.Parser,
+ state: SharedMarkdown.State,
+ ) {
+ const content = capture[1];
+ return {
+ content: SimpleMarkdown.parseInline(parse, content, state),
+ };
+ },
+ // eslint-disable-next-line react/display-name
+ react: (
+ node: SharedMarkdown.SingleASTNode,
+ output: SharedMarkdown.Output<SharedMarkdown.ReactElement>,
+ state: SharedMarkdown.State,
+ ) => <Text key={state.key}>{output(node.content, state)}</Text>,
+ },
inlineCode: {
...SimpleMarkdown.defaultRules.inlineCode,
// eslint-disable-next-line react/display-name

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 11:09 PM (21 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2598530
Default Alt Text
D5347.diff (1 KB)

Event Timeline