Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new spoiler extension #28

Open
wants to merge 7 commits into
base: gfm
Choose a base branch
from

Conversation

QuietMisdreavus
Copy link

This PR adds a variant of the strikethrough extension to create a new spoiler extension, for creating "spoiler" text. Since hiding text is a matter of styling it in the client, this extension just renders HTML as a <span class="spoiler"> tag.

@QuietMisdreavus
Copy link
Author

I'm working on updating this PR. It turns out that there are multiple implementations of spoiler text. The one i implemented was based on Discord's markup. However, Reddit uses a completely different set of delimiters, and formats its spoiler text >!like this!<. However, getting this to work as a GFM extension has involved some additional issues since ! can't currently be used as a special character by an extension. I'm trying to remedy this, but it's turning out to be more complicated than i thought it would be (which was already complicated enough).

In addition, at the same time i'm fixing some of the testing scripts to adjust to the different directory layout of this fork and update some Python conventions, since i hadn't tried executing them at that time. This is allowing me to properly run all the original CommonMark and GFM regression and specification tests, which is turning out to be very helpful.

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/spoiler-ext branch from 89c19cb to dce9a9b Compare December 29, 2021 19:36
@QuietMisdreavus QuietMisdreavus changed the base branch from gfm to QuietMisdreavus/extended-ext December 29, 2021 19:36
@QuietMisdreavus
Copy link
Author

I've updated the PR to add the option to parse Reddit-style spoiler delimiters instead of Discord-style delimiters. This involved pulling in work from upstream (#29) and fixing some unrelated issues (#30), which means that this PR now depends on those other ones. I've updated the base branch accordingly.

@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/spoiler-ext branch from dce9a9b to 71a79e4 Compare December 30, 2021 15:38
@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/extended-ext branch 2 times, most recently from 46bda92 to 05a5f22 Compare March 11, 2022 16:47
@QuietMisdreavus QuietMisdreavus force-pushed the QuietMisdreavus/extended-ext branch from d9b0520 to 76ae837 Compare March 16, 2022 18:58
Base automatically changed from QuietMisdreavus/extended-ext to gfm March 16, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant