Description
Describe the bug
I just tried moving all of my SnippetsLab snippets to massCode and discovered that massCode will delete everything in a file following 3 consecutive backticks. It doesn't seem to matter what language the file is set to.
Three backticks is the standard for code blocks in Markdown almost everywhere, including Github, so it shouldn't cause part of a snippet to be wiped. It should be possible to store valid Markdown in a snippet.
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
To reproduce
Assumes that the user is using Markdown as the storage method instead of Sqlite
- Create a snippet
- Set language to Markdown (or anything else)
- Paste in some Markdown content which includes standard Markdown code blocks (surrounded by 3 backticks), or paste in any content and type 3 backticks at the start of a line
- Select something else so the snippet is saved to disk, or wait until massCode auto-saves the file
- Anything in the file after the first set of 3 backticks is deleted
This happens even if the language is set to "Plain Text". It doesn't have to be set to Markdown for this issue to happen.
The documentation here suggests that code blocks can be displayed in a snippet, so I assume this should be possible:
https://masscode.io/documentation/markdown.html#render-code-blocks
You can use the raw Markdown from this Github project readme.md as an example. Just paste this into a Markdown snippet in massCode and it will delete everything after the first set of 3 backticks after a few seconds:
https://raw.githubusercontent.com/chicagocomputerclasses/SUPERSQL-Google-Sheets-Function/refs/heads/master/README.md
I assume this is happening because massCode uses 3 backticks as the container for fragments.
App Version and Architecture
4.7.1
System info
System:
OS: macOS 26.3.1
CPU: (10) arm64 Apple M1 Pro
Memory: 149.80 MB / 16.00 GB
Shell: 5.9 - /bin/zshValidations
- Follow our Code of Conduct
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Activity
[-][Bug]: Anything after standard Markdown code block syntax ``` is deleted automatically by massCode[/-][+][Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be irreversibly deleted[/+][-][Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be irreversibly deleted[/-][+][Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be hidden[/+]BryanWall commentedon Mar 17, 2026
I just tried testing it by putting the example from the documentation here in a snippet:
https://masscode.io/documentation/markdown.html#mermaid-diagrams
Even pasting this example into a snippet causes it to be instantly deleted. Here's a screen recording. A couple of seconds after I paste in the Markdown, it is deleted. When it disappears, that is massCode deleting it, not me.
Edit: Just typing 3 backticks in any snippet will cause everything following to be deleted
Screen.Recording.2026-03-17.at.3.24.33.PM.mov
[-][Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be hidden[/-][+][Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be deleted[/+]luojunqiang commentedon Mar 27, 2026
I'm new to this software and am experiencing the same issue when using the Markdown format vault. I prefer not to use the SQLite format, so I haven't tested it.
I’ve noticed that massCode uses Markdown documents to save snippet content, employing
'```'to separate the fragment content from other metadata. However, when there is a'```'in the snippet itself, it leads to parsing problems. Currently, I have to use'~~~'instead of'```'for code blocks.I believe that:
'````````````'or'~~~~~~~~~~', to ensure that most snippet content remains unaffected.serial commentedon Mar 27, 2026
In the meantime, using ~~~ (tildes) instead of ``` (backticks) for fenced code blocks works as a workaround, since tildes don't collide with the vault format's outer wrapping.
BryanWall commentedon Mar 31, 2026
Version 5.0.0 has been released without acknowledgement of this issue. The wrapper for fragments has been changed to a heading starting with "## Fragment: Fragment" followed by a line with 4 backticks.
The issue doesn't seem to happen now, but now Markdown rendering doesn't work at all in fragments.
antonreshetov commentedon Mar 31, 2026
In version 5, markdown snippets have become just snippets, everything related to markdown is obviously in the Notes space