jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.44k stars 3.37k forks source link

better quote handling in markdown reader #99

Closed jgm closed 13 years ago

jgm commented 13 years ago

Currently the markdown reader's quoted parser ignores curly double and single quotes. This is okay for some kinds of output, but not for others. It would be best to produce a Quoted inline consistently, whether or not curly quotes are used.

Also, the parser should be able to handle the American standard of putting an open quote at the beginning of a paragraph with no close quote, if the same speaker is speaking in the next paragraph.

Google Code Info: Issue #: 270 Author: fiddloso...@gmail.com Created On: 2010-11-21T21:39:35.000Z Closed On: 2010-12-07T04:38:38.000Z

jgm commented 13 years ago

The first part resolved by 7864f30717767f89ee33532b59819b51ef2e14d4

The second part (open quote with no close quote) dropped on closer consideration. It's a bad idea, because the writers will just put the close quote in.

Google Code Info: Author: fiddloso...@gmail.com Created On: 2010-12-07T04:38:38.000Z

artclarke commented 11 years ago

I don't know if it's worth considering, but I may have to stop using pandoc on my current work-in-progress because of this bug :( The project is a fiction novel with a lot of dialogue. There are sections where a character must talk for multiple paragraphs. Pandoc's handling of this is currently broken. Here's an example:

A lone Github commenter stepped up to the bug comments. "Look at this. It's dialogue that will extend across paragraphs.

"Now, the correct usage, per Strunk and White and the Chicago Manual of Style is to not close the quote in the paragraph before if the same speaker is speaking.

"And since in this sample dialogue, the same speaker is speaking, then the prior paragraphs should not have end quotes.

"Unfortunately, when using --smart with pandoc, this dialog will be incorrectly smart-quoted. Only this paragraph will get the correct quotes, and all prior paragraphs will get a closed-smart-quote at the start of the line," said the bug commenter. Sadly, he walked away.

Thanks.

jgm commented 11 years ago

It's not a closed smart quote -- it's a straight quote (not curly at all).

If you want to write in this style, you can always directly insert curly quotes. Generally it's pretty easy to program an editor to do this in a way that is easy to type.