fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
523 stars 55 forks source link

SmartyPants emulation only works for English #3

Closed fletcher closed 13 years ago

fletcher commented 13 years ago

The original MMD made use of several international variants of SmartyPants. I'll need to include this somehow in the new version

fletcher commented 13 years ago

Done.

jcoulombe commented 13 years ago

Not sure if the problem I have is supposed to be fixed (an should be reopened) or if this should be a new issue...

The problem:

A paragraph with several apostrophes is converted to single quotes when the second apostrophe is immediately followed by a non ASCII character. When mmd is used in most real world paragraphs (at least in French), apostrophes seem to be randomly converted to quotes.

Examples:

$ echo "l'année l'année" | multimarkdown -t latex
l'année l'année

$ echo "l'été l'année" | multimarkdown -t latex
l'été l'année

$ echo "l'été l'été" | multimarkdown -t latex
l`été l'été

$ echo "l'année l'été" | multimarkdown -t latex
l`année l'été

The first two are correct. The third and fourth are not.

fletcher commented 13 years ago

This is actually a new issue, and more properly a problem with the original peg-markdown. I have forwarded this to John MacFarlane, as I believe he could fix his code more easily than I could.

For now, let's leave this issue closed on peg-multimarkdown, and if you don't hear anything in the next week or so about it being fixed, then you can open a new issue here or on the peg-markdown project. Watch the development branch for a fix, as that will be the first place it shows up.

I believe you are correct, though, about the non-ascii character being the source of the problem. If you read the last line of the peg-markdown (not peg-multimarkdown) README, that may point towards the bug?

fletcher commented 13 years ago

John has updated peg-markdown and it partly fixes this, but not entirely. I have pulled his changes, but didn't realize that the fix wasn't total. But I hope he will have a fix soon.

fletcher commented 13 years ago

I think this is now fixed in the latest development branch - thanks to John MacFarlane for working so hard to fix this!

jcoulombe commented 13 years ago

Indeed. Seems fixed to me. Thanks!