Fixed issue with markdown variable not being properly closed over.