next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.45k stars 434 forks source link

代码块 Golang 的 Tab 缩进异常 #183

Closed ghost closed 3 years ago

ghost commented 3 years ago

Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Expected behavior

package main

import "fmt"

func Sqrt(x float64) float64 {
    z := 1.0
    for i := 0; i < 10; i++ {
        z -= (z*z - x) / (2 * z)
    }

    return z
}

func main() {
    fmt.Println(Sqrt(2))
}

Actual behavior

Steps to reproduce the behavior

Environment Information

Node.js and NPM Information

v14.15.4
6.14.10

Package dependencies Information

# 已关闭all_minifier
uuznn-blog@0.1.0 /home/z/hexo/blog
├── @waline/hexo-next@1.0.3
├── hexo@5.3.0
├── hexo-all-minifier@0.5.5
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-feed@3.0.0
├── hexo-generator-index@2.0.0
├── hexo-generator-searchdb@1.3.3
├── hexo-generator-seo-friendly-sitemap@0.2.1
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@3.3.0
├── hexo-renderer-stylus@2.0.1
├── hexo-server@2.0.0
└── hexo-theme-next@8.2.0

Hexo Configuration

# 已关闭all_minifier
all_minifier: false

# Writing
new_post_name: :year/:title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ""
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace: true
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ""

NexT Configuration

codeblock:
  # Code Highlight theme
  # All available themes: https://theme-next.js.org/highlight/
  theme:
    light: tomorrow
    dark: tomorrow-night
  copy_button:
    enable: true
    style: mac

Other Information

welcome[bot] commented 3 years ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 3 years ago

你设置了 tab_replace: true,因此 tab 会被替换为 true 😂

ghost commented 3 years ago

你设置了 tab_replace: true,因此 tab 会被替换为 true 😂

Hexo 配置选项太广泛了,新手好难啊😂

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.