fixing pandoc preprocessing