Awkee / pandoc

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

backslash removes following text #231

Closed GoogleCodeExporter closed 9 years ago

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

1. echo '\Doe2008' | pandoc -w plain

What is the expected output? What do you see instead?

I'd expect 'Doe2008' but I see '2008'.

What version of the product are you using? On what operating system?

pandoc 1.5.1 with citeproc and syntax highlighting on debian unstable.

Original issue reported on code.google.com by xabb...@gmail.com on 4 Apr 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Tried with pandoc 1.5.1.1 and its fixed there. Sorry about the noise.

Original comment by xabb...@gmail.com on 5 Apr 2010 at 12:02

GoogleCodeExporter commented 9 years ago
I think you're mistaken in thinking it's "fixed" - 1.5.1.1 behaves the same.
To see *why* it behaves that way, do
% pandoc -t native
\Doe2008
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
[ Para [TeX "\\Doe",Str "2008"] ]

pandoc interprets a backslash followed by a string of letters as a raw LaTeX 
command. These aren't printed in HTML output, which is why you see the text 
disappear.

If you use '--strict' mode, you won't see this behavior.

So I don't think this is a bug -- it's a pandoc feature that it allows you to 
use raw 
LaTeX (perhaps a misguided feature, but now well established).  And I think it 
makes 
sense to skip raw LaTeX in HTML output, though early versions of pandoc did not.

Does that seem reasonable?

Original comment by fiddloso...@gmail.com on 5 Apr 2010 at 12:39

GoogleCodeExporter commented 9 years ago
Completely forgot about this feature, even so I use it all the time (so no its 
not
misguided). I probably used -w markdown when I tried 1.5.1.1 instead of -w 
plain.

Original comment by xabb...@gmail.com on 5 Apr 2010 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by fiddloso...@gmail.com on 5 Apr 2010 at 1:54