You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Using standard Markdown code block syntax ``` in a snippet causes everything following to be deleted #696
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.
changed the title [-][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[/+]on Mar 17, 2026
changed the title [-][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[/+]on Mar 17, 2026
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
changed the title [-][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[/+]on Mar 17, 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:
MassCode should escape any instances of '```' in the snippet content before saving it to the Markdown file.
MassCode could use a more effective separator, such as '````````````' or '~~~~~~~~~~', to ensure that most snippet content remains unaffected.
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.
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.
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