Escaping Preformatted Blocks in Gemini Thread

Created: 2020-11-11T21:38:23-06:00

Return to the Index

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