PurpleTree is written in a few hundred lines of [PHP](/aw/lang/php). It uses ParseDown to render the MarkDown to [HTML](/aw/lang/html). In addition to ParseDown, it converts WikiWord's to links, along with a few other things, [SuchAsAbusingLinkNotationToProtectWikiWordsFromBeingTurnedIntoLinks](). (The definitive guide is the PtWikiRendererParsedown1Php.) Syntax highlighting is done via [highlight.js](https://highlightjs.org/).