hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
340 stars 60 forks source link

config.yml文件中markdown下 breaks 配置回车换行无效? #183

Closed YiandLi closed 3 months ago

YiandLi commented 2 years ago

在hexo配置文件中加上这个,想要实现breaks: true的效果,即回车自动换行。

markdown:
  render:
    html: true
    xhtmlOut: false
    breaks: true
    linkify: true
    typographer: true
    quotes: '“”‘’'
  plugins:
    - markdown-it-abbr
    - markdown-it-footnote
    - markdown-it-ins
    - markdown-it-sub
    - markdown-it-sup
  anchors:
    level: 2
    collisionSuffix: 'v'
    permalink: true
    permalinkClass: header-anchor
    permalinkSymbol: ¶

但是并不work,请问大佬们如何解决?

npm list为:

hexo-site@0.0.0 /Users/----/blog
├── hexo-filter-mathjax@0.8.0
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-index@2.0.0
├── hexo-generator-searchdb@1.4.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-markdown-it@6.0.1
├── hexo-renderer-mathjax@0.6.0
├── hexo-renderer-stylus@2.1.0
├── hexo-server@3.0.0
├── hexo-theme-landscape@0.0.3
└── hexo@6.2.0
lulu010722 commented 1 year ago

Same here. There is no \<br> tag rendered in the html after set breaks to be true.

uiolee commented 10 months ago

Cannot reproduce. It works well

图片

---
title: Hello World
---

first line.
fagrhttgrfa

ytuikjyj
fagrhttgrfa
uiolee commented 3 months ago

I cannot reproduced your case and no one provides enough information, I am going to close this issue.

If the problem still exists, please reopen this issue and provide more information.