A Visual Studio Code extension that adds support for the Reddit >!spoiler!<
syntax to the built-in
markdown preview.
- Use
>!spoiler!<
to hide spoiler text, and click on it to uncover - just like on Reddit - Based on the markdown-it plugin markdown-it-reddit-spoiler
- Uses the checkbox CSS hack to ensure spoilers can be smoothly checked and unchecked
Press the F1 key inside of Visual Studio Code and type extension
. Choose Extensions: Install Extension
and then select the Reddit Spoiler for Markdown Preview
extension from the list.
cd $HOME/.vscode/extensions
git clone https://github.com/AbhijeetKrishnan/vscode-markdown-reddit-spoiler.git
cd vscode-markdown-reddit-spoiler
npm install
cd %USERPROFILE%\.vscode\extensions
git clone https://github.com/AbhijeetKrishnan/vscode-markdown-reddit-spoiler.git
cd vscode-markdown-reddit-spoiler
npm install
- Markdown present within spoiler tags will not be correctly rendered. This includes (but is not limited to) tables, text containing one or more empty lines, TeX math (rendered, for e.g., using Markdown+Math) and images.
- spoilers in the preview rapidly flash when the Markdown file is being actively updated, which can be distracting