socmap / pandoc

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

It would be good to handle quoted literal blocks for rst #306

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
ReStructuredText has a form called "Quoted Literal Block".  I've quoted the 
spec below.

pandoc doesn't recognize this form, and converts into an ordinary paragraph.

From spec:

Quoted Literal Blocks

Quoted literal blocks are unindented contiguous blocks of text where each line 
begins with the same non-alphanumeric printable 7-bit ASCII character [5]. A 
blank line ends a quoted literal block. The quoting characters are preserved in 
the processed document.
[5] 

The following are all valid quoting characters:

! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Note that these are the same characters as are valid for title adornment of 
sections.

Original issue reported on code.google.com by jdsimon...@gmail.com on 6 Jun 2011 at 10:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Pandoc's rst parser handles quoted literal blocks using the '|' character.  I 
didn't know you could also use these other characters -- perhaps that is a 
recent addition?  In any case, I don't see how a rst parser is supposed to know 
whether

- one
- two

is a quoted literal block or a list!  Also, I tried with rst2html (from 
Docutils 0.7), and while '>' and '|' worked, '}' did not.

Original comment by fiddloso...@gmail.com on 7 Jun 2011 at 10:14

GoogleCodeExporter commented 8 years ago
That's interesting.  It isn't working for me.  Can you post the rst you used
where it worked, so I can see if there's something wrong with my source?
(I'm not producing the rst, just trying to convert it.)

Original comment by jdsimon...@gmail.com on 8 Jun 2011 at 8:19

GoogleCodeExporter commented 8 years ago
Oops, I was confusing "line blocks" (using |) with quoted literal blocks.  Only 
the former are supported in pandoc.
Though I wonder how the rst parser is supposed to know whether

| hi
|  there

is a line block or a quoted literal block?
It seems to match the specification for both.

Original comment by fiddloso...@gmail.com on 9 Jun 2011 at 12:50