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

Hexo strips leading spaces in code blocks #5422

Closed
5 tasks done
TripleCamera opened this issue Feb 18, 2024 · 3 comments · Fixed by #5427
Closed
5 tasks done

Hexo strips leading spaces in code blocks #5422

TripleCamera opened this issue Feb 18, 2024 · 3 comments · Fixed by #5427

Comments

@TripleCamera
Copy link

TripleCamera commented Feb 18, 2024

Check List

  • I have already read Docs page & Troubleshooting page.
  • I have already searched existing issues and they are not help to me.
  • I examined error or warning messages and it's difficult to solve.
  • I am using the latest version of Hexo. (run hexo version to check)
  • My Node.js is matched the required version.

Expected behavior

Leading spaces in code blocks are not stripped.

Actual behavior

Leading spaces in code blocks are stripped.

How to reproduce?

Render the following lines:

This is a paragraph.
```
    This is a code block
    with 4 spaces
    at the beginning of
    each line.
```

Here is a live example on my blog.

Is the problem still there under Safe mode?

Cannot generate pages at all under safe mode.

Your Node.js & npm version

v20.11.0
10.2.4

Your Hexo and Plugin version

hexo-site@0.0.0 D:\GitHub\triplecamera.github.io
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-pandoc@0.4.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-next@8.19.1
└── hexo@7.1.1

Your package.json

See https://github.com/TripleCamera/triplecamera.github.io.

Your site's _config.yml (Optional)

See https://github.com/TripleCamera/triplecamera.github.io.

Others

No response

@uiolee
Copy link
Member

uiolee commented Feb 20, 2024

@TripleCamera
Copy link
Author

Hi, how is everything going?

@TripleCamera
Copy link
Author

Cheers! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants