Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Reddit Spoilers for Markdown PreviewNew to Visual Studio Code? Get it now.
Reddit Spoilers for Markdown Preview

Reddit Spoilers for Markdown Preview

Abhijeet Krishnan

|
395 installs
| (1) | Free
Adds Reddit spoiler syntax support to VS Code's built-in markdown preview
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Reddit Spoilers for Markdown

Marketplace GitHub

Demo

What is it?

A Visual Studio Code extension that adds support for the Reddit >!spoiler!< syntax to the built-in markdown preview.

Features

  • 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

Installation ...

... from inside of VSCode

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.

... from the Mac/Linux Command Line

cd $HOME/.vscode/extensions
git clone https://github.com/AbhijeetKrishnan/vscode-markdown-reddit-spoiler.git
cd vscode-markdown-reddit-spoiler
npm install

... from the Windows Command Line

cd  %USERPROFILE%\.vscode\extensions
git clone https://github.com/AbhijeetKrishnan/vscode-markdown-reddit-spoiler.git
cd vscode-markdown-reddit-spoiler
npm install

Issues

  • 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
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft