Escaping Preformatted Blocks in Gemini Thread
Created on 2020-11-11T21:38:23-06:00
Basically there is no way to embed "```" inside a preformatted block because there is no way to escape or place a tag on it. Someone asked for a way to do this. They were told escape codes are bloat.
Quinn disagrees because no escaping is necessary and the usual mimetype block encoding works fine: any bytes after "```" become the block name, you remain in preformatted mode until you see a byte identical "```" with the same block name. No escape logic is necessary. You can even say the whole line may not be more than 1024 bytes since that is the size Gemini likes to cut off by.
This is how encoding payloads in e-mails work and its fine.
References
- https://lists.orbitalfox.eu/archives/gemini/2020/003196.html
- https://lists.orbitalfox.eu/archives/gemini/2020/003212.html