Extracting code the pandoc way