hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
38.96k stars 4.78k forks source link

Code Block typography is messy #4088

Closed Coolkkmeat closed 4 years ago

Coolkkmeat commented 4 years ago

My English is not good, so I use Google Translate, thanks.

Check List

Please check followings before submitting a new issue.

Expected behavior

Typesetting is normal, same as vscode

Actual behavior

Typographical error, each block is different, spaces and tabs are invalid 1 But vscode and other markdown tools can display normally. 4 spaces, 1 tab, 2 spaces, 3 spaces, all will not work

How to reproduce?

Use "Three anti single quotes" to include code blocks, such as java and xml

Environment & Settings

Node.js & npm version

Node:v12.13.1
NPM:6.12.1

Your site _config.yml (Optional)

Same as the official documentation, there should be no problem here

Your theme _config.yml (Optional)

butterfly Theme
Github:https://github.com/jerryc127/hexo-theme-butterfly

I previously mentioned the issue to the author of the theme. 
But the author replied that theme is not responsible for rendering the code. And let me give feedback on hexo.
ISSUE:https://github.com/jerryc127/hexo-theme-butterfly/issues/104

Hexo and Plugin version(npm ls --depth 0)

E:\OneDrive\Local\Blog>npm ls --depth 0
hexo-site@0.0.0 E:\OneDrive\Local\Blog
+-- hexo@4.1.1
+-- hexo-browsersync@0.3.0
+-- hexo-deployer-git@2.1.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-index-pin-top@0.2.2
+-- hexo-generator-tag@1.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@2.0.0
+-- hexo-renderer-pug@1.0.0
+-- hexo-renderer-stylus@1.1.0
+-- hexo-server@1.0.0
`-- hexo-wordcount@6.0.1

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "4.1.1"
  },
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-browsersync": "^0.3.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index-pin-top": "^0.2.2",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-pug": "^1.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0",
    "hexo-wordcount": "^6.0.1"
  }
}

Others

Thanks, i really like hexo.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stevenjoezhang commented 2 years ago

This bug should be fixed in https://github.com/hexojs/hexo-util/pull/260