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