Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32166337
D5347.1765050680.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5347.1765050680.diff
View Options
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,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
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 7:51 PM (43 m, 55 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840510
Default Alt Text
D5347.1765050680.diff (1 KB)
Attached To
Mode
D5347: Add spoiler rule to native in fullMarkdownRules
Attached
Detach File
Event Timeline
Log In to Comment