Awkee / pandoc

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

Code incorrectly escaped in manpage output #223

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

The following markdown should generate a JSON code block (from attached 
document):

## Example:

    [
     [["Hello", "Hi"], ["<reply> Hi There", "<action> waves"]],
     [["Bye"], ["<reply> kbye $who", "<reply> Cheers"]]
    ]

What is the expected output? What do you see instead?
The generated nroff is:
.PP
\f[CR]
      [
      \ [[\"Hello\",\ \"Hi\"],\ [\"<reply>\ Hi\ There\",\ \"<action>\ 
waves\"]],
      \ [[\"Bye\"],\ [\"<reply>\ kbye\ $who\",\ \"<reply>\ Cheers\"]]
      ]
\f[]

And renders as:
   Example:

             [
              [[
              [[
             ]

It should have been escaped with .nf ... .fi

What version of the product are you using? On what operating system?
pandoc 0.46+2+nmu1 on Ubuntu

Original issue reported on code.google.com by stefano.rivera on 15 Mar 2010 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, that's incorrect. The problem is that it escapes ", which it shouldn't

Original comment by stefano.rivera on 15 Mar 2010 at 7:16

GoogleCodeExporter commented 9 years ago
I wish I could edit the title and description.

My workaround solution is to pass the pandoc generated manpage through
sed -e '/^[^.]/ s/\\"/"/g'

Quotes must only be escaped on lines beginning with directives.

Original comment by stefano.rivera on 16 Mar 2010 at 9:10

GoogleCodeExporter commented 9 years ago
Thanks for pointing this out.

Original comment by fiddloso...@gmail.com on 16 Mar 2010 at 3:02

GoogleCodeExporter commented 9 years ago
I just saw the "pandoc 0.46" part.  Turns out this is a bug I fixed long ago.  
Ubuntu is 
way behind -- I'm about to come out with 1.5.

If you want the latest, apt get cabal-install, then:

cabal update
cabal install pandoc

Original comment by fiddloso...@gmail.com on 18 Mar 2010 at 1:49

GoogleCodeExporter commented 9 years ago
My mistake. didn't even consider checking releases (one assumes the ubuntu 
development 
release will be up to date with just about everything)

Original comment by stefano.rivera on 18 Mar 2010 at 8:26