Pergunta de entrevista da empresa Samsara

How would you implement a Markdown parser?