-
-
Notifications
You must be signed in to change notification settings - Fork 247
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.