0

For example, when I conver the following page: https://developers.google.com/edu/python/strings

s = 'hi'
print s[1]          ## i
print len(s)        ## 2
print s + ' there'  ## hi there

becomes

.. code:: prettyprint

      s = 'hi'  print s[1]          ## i  print len(s)        ## 2  print s + ' there'  ## hi there

This is because there is a tag on the pre block: <pre class=prettyprint> How can I make pandoc to print out the codeblock with proper space? --no-highlight didn't do anything it seems.

Forethinker
  • 3,548
  • 4
  • 27
  • 48

1 Answers1

2

This is because the source code in your link uses <br> tags rather than newline characters. Pandoc should probably interpret <br> tags inside <pre> tags.

I have opened an issue on the pandoc issue tracker here.