Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助:单引号显示异常 #1981

Closed
lam0114 opened this issue May 25, 2016 · 18 comments

Comments

@lam0114
Copy link

commented May 25, 2016

我用的英文单引号,比如 'Welcome' to Hexo! ,
显示在浏览器中就变成了
‘Welcome’ to Hexo! ,单引号变成中文的了。

和用的什么主题貌似没关系,因为我在本地hexo init blog,然后改的hello world,在浏览器查看时就不对,英文变中文单引号了。

这是为什么?求助,谢谢!

@swj1442291549

This comment has been minimized.

Copy link

commented Jun 11, 2016

我也有这个问题,似乎英文下的单引号和双引号都变成了中文的

@heidyhe

This comment has been minimized.

Copy link

commented Jun 19, 2016

有同样的问题:我用的英文单引号和双引号在hexo g生成的html文件中都变成中文符号,请问能什么时候修复吗?

@swj1442291549

This comment has been minimized.

Copy link

commented Jun 21, 2016

我看了一下,渲染的 rendered font 是 “Microsoft YaHei”。而 CSS 中的字体似乎都是 macOS 上独有的,导致浏览器使用才做系统的默认字体。而 “Microsoft YaHei” 对于引号的处理就是全角的。所以我改了一下 CSS 强制换了一个 font-family,就解决了

@snaketears

This comment has been minimized.

Copy link

commented Jun 23, 2016

单纯更改CSS字体无法解决此问题,我看了下,生成html引号就已经被替换成中文引号了。
似乎使用{% raw %}可解决此问题,但是我又不想每篇文章都加入和markdown语法无关地代码,请问这个问题还有其他方式解决吗?

@Xuanwo

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2016

字体fallback的问题吧?
你们用Arial之类的试试看。

@bitmingw

This comment has been minimized.

Copy link

commented Jun 26, 2016

straight quotation mark 经过 hexo generate 之后就会变成 curly quotation mark, 和用什么主题没有关系。这种隐含的转换对 yilia 这种用微软雅黑字体的主题影响很显著。

@snaketears

This comment has been minimized.

Copy link

commented Jun 27, 2016

@bitmingw 请问有办法可以解决么?因为我的文档中夹杂了大量双引号,文档翻阅着实难看。

@bitmingw

This comment has been minimized.

Copy link

commented Jun 28, 2016

@snaketears 这个问题只对部分字体影响比较大,像我用的 Lato 系字体就没有明显的区别。如果是 code 必须要维持原先的引号那就必须得把它包裹起来了。

@lam0114

This comment has been minimized.

Copy link
Author

commented Jun 29, 2016

感觉我的问题比较奇怪,写的时候用的 'app' 这种,渲染之后就变成了 ’app’, 都变成了右引号,现在只能把引号删掉不用了。我用默认的主题试过,也是这个样子。
请问有谁知道原因么?

@lam0114

This comment has been minimized.

Copy link
Author

commented Jun 29, 2016

@swj1442291549 请问你改用的是什么字体?谢谢

@swj1442291549

This comment has been minimized.

Copy link

commented Jun 29, 2016

我使用Arial,但这只是让引号看起来是英文的,实际上还是中文的引号, @snaketears 已经指出了这一点。换字体指标不治本。

@snaketears

This comment has been minimized.

Copy link

commented Jun 29, 2016

@tommy351 关注,个人觉得这是一个BUG。暂时只能通过{% raw %}解决。

@tommy351

This comment has been minimized.

Copy link
Member

commented Jun 29, 2016

如果用的是 marked renderer 的話,可以試試看關掉 smartypants?

marked:
  smartypants: false
@snaketears

This comment has been minimized.

Copy link

commented Jun 29, 2016

@tommy351 感谢,问题已经解决。

@lam0114

This comment has been minimized.

Copy link
Author

commented Jun 29, 2016

@tommy351 十分感谢,问题已解决。

@lam0114 lam0114 closed this Jun 29, 2016
@counter2015

This comment has been minimized.

Copy link

commented Jan 17, 2019

@tommy351 我也遇到了相同的问题,感谢!

@xiebruce

This comment has been minimized.

Copy link

commented Jan 21, 2019

@tommy351 虽然我不是hexo,但同样遇到这问题,开始我找字体找关天,看了你这个我才知道是markdown解析器的问题,感谢!

@liuqinh2s

This comment has been minimized.

Copy link

commented Apr 15, 2019

the same issue: 462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.