Simplify html transformation using pandoc