anammari / pandoc

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

smart mode enters infinite loop when dealing with quotes #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. wget http://www.thev.net/download/abc.txt
2. pandoc -S abc.txt
3.

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

Instead of producing output, it just sits there and wastes CPU.

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

pandoc 1.2 on linux 386 with GHC 6.10.2.

Please provide any additional information below.

Sorry if you can't read the test file (which is in Chinese UTF8), but the 
reason it loops forever is due to nested and unbalanced parsing of unicode 
single quotes (\8216 and \8217), and double quotes (\8220 and \8221). 
After making singleQuoteStart and doubleQuoteStart accept both instead of 
just the opening quotes, the problem goes away. I doubt this is the 
expected fix, but I'm in a rush and don't have time to figure out all the 
parser tricks. 

Original issue reported on code.google.com by nine...@gmail.com on 21 May 2009 at 11:55

GoogleCodeExporter commented 8 years ago
Resolved in 5d9d7f32cacde467a747b7ae8e7d8d85a410e528

Now the parser just leaves unicode curly quotes alone, instead of trying to 
parse them as Quoted text.

Original comment by fiddloso...@gmail.com on 10 Apr 2010 at 7:07