khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

support quoted literal blocks in rst #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quoted literal blocks in rst spec:

http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#quoted-litera
l-blocks

This is useful for literate Haskell.

The current approach rst+lhs will either make the doc incompatible with the
rst spec or leave extra '::':

Example code:

  In Bird-style you have to leave a blank before the code.

  > fact :: Integer -> Integer
  > fact 0 = 1
  > fact n = n * fact (n-1)

  And you have to leave a blank line after the code as well.

In pandoc (rst+lhs) this renders correct but according to rst spec,
docutilus will render the above as:

  In Bird-style you have to leave a blank before the code.

  > fact :: Integer -> Integer > fact 0 = 1 > fact n = n * fact (n-1)

  And you have to leave a blank line after the code as well.

Adding '::' makes this conforms to rst spec:

  In Bird-style you have to leave a blank before the code.::

  > fact :: Integer -> Integer
  > fact 0 = 1
  > fact n = n * fact (n-1)

  And you have to leave a blank line after the code as well.

But it leaves extra '::' in pandoc(rst+lhs):

  In Bird-style you have to leave a blank before the code.:

  ::

  fact :: Integer -> Integer
  fact 0 = 1
  fact n = n * fact (n-1)

  And you have to leave a blank line after the code as well.

Original issue reported on code.google.com by weakish on 22 Dec 2009 at 3:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1668.

Original comment by fiddloso...@gmail.com on 22 Dec 2009 at 7:27

GoogleCodeExporter commented 9 years ago
By the way, I've made the :: optional.
If you think it should be mandatory, I can reconsider.

Original comment by fiddloso...@gmail.com on 22 Dec 2009 at 7:29