Why “--” turns into "-" when I deploy my markdown file using Hexo?

65 views Asked by At

I am learning to use hexo to bolg. When I finish my job and deploy it.I find that all "--" turn into "-".What is the reason and how can I fix it.

1

There are 1 answers

0
Ivan Nginx On BEST ANSWER
  1. The reason why in Hexo all double hyphens (--) generate into long dashes (&mdash or ) is because in hexo-renderer-marked plugin option smartypants (Use "smart" typograhic punctuation for things like quotes and dashes) is enabled by default.
  2. To disable it add in main Hexo _config.yml:

    marked:
      smartypants: false
    

    After that need to update text in your *.md file to regenerate output with new parameters by this plugin. Of course, hexo clean && hexo g or reload hexo s after that.