technique reference · by file type
Hidden text in plain text and Markdown files
A text file has no formatting to hide anything in, which makes it look safe. It is very often Markdown, though, and Markdown is very often rendered: a comment or a link title is in the file and on no page anybody reads. An AI model handed the file reads all of it.
We read a text file twice. Once as the text it is, and once as a browser would, so a span styled to be invisible is found even when it sits in the middle of a page of notes. Characters that draw nothing are covered on their own page, and apply here too.
txt.markdown-alt-textThe words in ``: shown only where the picture fails to load, and read in full by any model handed the file.txt.markdown-unrenderedA Markdown comment, or the title of a link: in the file, read by every model handed the file, and shown by nothing that renders it.txt.terminal-controlEscape sequences, backspaces and carriage returns that a terminal obeys: show the file in a terminal and one document appears, hand the bytes to a model and it reads another.