khatchad
khatchad

Reputation: 3178

How to stop pandoc from escaping characters?

Suppose I want to use pandoc to convert between markdown flavors:

$ echo "# Header #1" | pandoc -t markdown

I get the following output with the #1 escaped:

Header \#1
==========

How do I prevent pandoc from doing this?

Upvotes: 5

Views: 2654

Answers (1)

alexandre-rousseau
alexandre-rousseau

Reputation: 2820

You can pipe the output to sed like this to remove \

$ echo "# Header #1" | pandoc -t markdown | sed 's/\\//g'

I know this is not a perfect solution, but it works if your document does not contain \ char.

Upvotes: 2

Related Questions