markdown: Add support for spoilers.

This adds support for a "spoiler" syntax in Zulip's markdown, which
can be used to hide content that one doesn't want to be immediately
visible without a click.

We use our own spoiler block syntax inspired by Zulip's existing quote
and math block markdown extensions, rather than requiring a token on
every line, as is present in some other markdown spoiler
implementations.

Fixes #5802.

Co-authored-by: Dylan Nugent <dylnuge@gmail.com>
This commit is contained in:
Sara Gulotta
2020-04-04 16:14:34 -04:00
committed by Tim Abbott
parent 54604257e0
commit 1cb040647b
19 changed files with 383 additions and 7 deletions

View File

@@ -438,6 +438,7 @@ exports.initialize_everything = function () {
subs.initialize();
stream_list.initialize();
condense.initialize();
spoilers.initialize();
lightbox.initialize();
click_handlers.initialize();
copy_and_paste.initialize();