Then it would be a text file, so you would read and write it like any other text file. As you read each line, you'd parse it based on the rules of markdown. You could create dedicated classes for reading and writing files but, inside those, you'd still be treating it like any other test file.