Skip to content

backslash removes following text #135

Closed
jgm opened this Issue · 4 comments

1 participant

@jgm
Owner

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.

Google Code Info:
Issue #: 231
Author: g...@search.ch
Created On: 2010-04-04T23:42:05.000Z
Closed On: 2010-04-05T01:54:49.000Z

@jgm jgm was assigned
@jgm jgm closed this
@jgm
Owner

Tried with pandoc 1.5.1.1 and its fixed there. Sorry about the noise.

Google Code Info:
Author: g...@search.ch
Created On: 2010-04-05T00:02:23.000Z

@jgm
Owner

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?

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2010-04-05T00:39:43.000Z

@jgm
Owner

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.

Google Code Info:
Author: g...@search.ch
Created On: 2010-04-05T01:21:23.000Z

@jgm
Owner

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2010-04-05T01:54:49.000Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.