discourse/plugins/spoiler-alert
Régis Hanol 94cf1c4786 FIX: quoting a spoiler
Was "removing" (rather not re-applying) the `[spoiler]` BBCode because we were testing the **whole** class of the `span`/`div` was `spoiled` but we added another class and thus broke this functionnality.

In order to fix this issue, the test to determine whether a `span`/`div` is a spoiler, now uses a regular expression to check whether the `class` **contains** the word `spoiled`.

Reference - https://meta.discourse.org/t/quoting-spoiler-text-doesnt-include-spoiler-tags-in-the-quote/170145
2024-05-28 19:24:52 +02:00
..
assets FIX: quoting a spoiler 2024-05-28 19:24:52 +02:00
config FEATURE: Add Uyghur language (#27183) 2024-05-27 09:58:18 +02:00
spec DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
test/javascripts FIX: quoting a spoiler 2024-05-28 19:24:52 +02:00
README.md
plugin.rb DEV: Remove the last `transpile_js` mentions (#26263) 2024-03-20 15:32:37 +01:00

README.md

discourse-spoiler-alert

https://meta.discourse.org/t/discourse-spoiler-alert/12650/

Spoiler plugin for Discourse highly inspired by the spoiler-alert jQuery plugin.

Usage

In your posts, surround text or images with [spoiler] ... [/spoiler]. For example:

I watched the murder mystery on TV last night. [spoiler]The butler did it[/spoiler].

Installation

  • Add the plugin's repo url to your container's app.yml file
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
  • Rebuild the container
cd /var/discourse
git pull
./launcher rebuild app

License

MIT