remove trailing whitespace bug in pandoc syntax