jgm / gitit

A wiki using HAppS, pandoc, and git
GNU General Public License v2.0
2.16k stars 226 forks source link

Quotation marks was wrong on rendered #525

Open shajiquan opened 8 years ago

shajiquan commented 8 years ago

' was rendered as and " was rendered as .

Gitit version: gitit version 0.12.0.1 -plugins OS: Max OS X and Ubuntu 12.04

Input

Yes 'i am in a SINGLE'

Yes "i am in a DOUBLE"

Output, Renered

Yes ‘i am in a SINGLE’

Yes “i am in a DOUBLE”

demo here

http://gitit.johnmacfarlane.net/test_quote

jgm commented 8 years ago

Gitit does "smart quotes" by default. (Indeed, there's no way to turn this off.) If you want straight quotes (which are not recommended typographically), you can escape them with backslashes.

+++ shajiquan [Dec 22 15 01:46 ]:

' was rendered as ‘ and " was rendered as “

Input

Yes 'i am in a SINGLE'

Yes "i am in a DOUBLE"

Output, Renered

Yes ‘i am in a SINGLE’

Yes “i am in a DOUBLE”

demo here

[1]http://gititjohnmacfarlanenet/test_quote

— Reply to this email directly or [2]view it on GitHub.

References

  1. http://gititjohnmacfarlanenet/test_quote?revision=4720ece8f1aa2485f4ee7f107978106ff8e16c2d
  2. https://github.com/jgm/gitit/issues/525
shajiquan commented 8 years ago

Thanks for the reply.

I think I'd better find another way. That's will be great if there will be an options to custom it.

die4live commented 8 years ago

@jgm this "smart quotes" will cause an improper result if you have a quote mark in a wiki link:<

Let's say in the home page after starting a new empty wiki, we got a "Gitit User’s Guide" page at the end of the index page. However, you will be redirected to the SMART url: localhost/Gitit%20User’s%20Guide when you click it, and get a "Server error: git: recoverEncode: invalid argument (invalid character)". Because there is no page exist with this SMART QUOTE one but the localhost/Gitit%20User's%20Guide.

Hope that will help you to notice this is an unnecessary transformation by default. Thanks.

jgm commented 8 years ago

I'd be open to having a config option to turn this on or off. However, I'm really swamped with other things (and haven't maintained gitit very actively for a long time), so I'm unlikely to get to it myself in the near future. Maybe someone can submit a PR?

+++ Zhongji SHEN [Dec 23 15 00:08 ]:

[1]@jgm this "smart quotes" will cause an improper result if you have a quote mark in a wiki link:<

Let's say in the home page after starting a new empty wiki, we got a "Gitit User’s Guide" page at the end of the index page. However, you will be redirected to the SMART url: localhost/Gitit%20User’s%20Guide when you click it, and get a "Server error: git: recoverEncode: invalid argument (invalid character)". Because there is no page exist with this SMART QUOTE one but the localhost/Gitit%20User's%20Guide.

Hope that will help you to notice this is an unnecessary transformation by default. Thanks.

— Reply to this email directly or [2]view it on GitHub.

References

  1. https://github.com/jgm
  2. https://github.com/jgm/gitit/issues/525#issuecomment-166831022