Page MenuHomePhabricator

[web] Add spoiler rule to simpleMarkdownRules
ClosedPublic

Authored by rohan on Nov 7 2022, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 17, 4:15 AM
Unknown Object (File)
Mon, Mar 17, 4:13 AM
Unknown Object (File)
Tue, Feb 25, 5:30 PM
Unknown Object (File)
Tue, Feb 25, 5:30 PM
Unknown Object (File)
Mon, Feb 24, 7:46 PM
Unknown Object (File)
Feb 20 2025, 6:00 PM
Unknown Object (File)
Feb 14 2025, 6:23 PM
Unknown Object (File)
Feb 7 2025, 4:42 PM

Details

Summary

We add the rule to web/markdown/rules.react.js in order to parse content enclosed within the || ... || characters to be spoilers. This is the web implementation of the spoiler feature.

Linear: https://linear.app/comm/issue/ENG-2190/add-spoiler-rule-to-simplemarkdownrules-in-webmarkdownrulesreactjs

Test Plan

Looked at the output in the inspect element tab on a specific message that has spoiler content. For now, until the next diff, the spoiler content is enclosed within span tags, signifying that the spoiler parse rule is working.

Spoiler Rule.png (1×2 px, 508 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan edited the test plan for this revision. (Show Details)
rohan attached a referenced file: F226270: Spoiler Rule.png. (Show Details)
rohan requested review of this revision.Nov 7 2022, 11:57 AM

Looks like it matches D5347 (would've been helpful to link since the changes to native/markdown/rules.react.js haven't been landed in the repo)

This revision is now accepted and ready to land.Nov 8 2022, 7:14 AM
In D5546#164711, @atul wrote:

Looks like it matches D5347 (would've been helpful to link since the changes to native/markdown/rules.react.js haven't been landed in the repo)

Makes sense, thanks for the heads up