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

考虑遵循 Markdownlint 的代码风格以保证可读性和风格一致性 #1

Open
k4yt3x opened this issue May 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@k4yt3x
Copy link
Member

k4yt3x commented May 23, 2020

Repository 里的文章代码风格不太一致,也没有遵循一些 best practice。例如代码块开始的时候没有标注语言,这样有些静态页面上生成器或者主题将无法正确高亮代码。

比如说这里就应该标注 console

image
Repo 中未标注语言的代码块

以下是 Cisco 的用例

image
Cisco Markdown 代码用例

markdownlint 里制定了一些类似于 Python PEP8 的规则让代码更可读,可以考虑遵循这个插件的提示修改一下代码风格。

image
例一:标题后没有空行

image
例二:代码块没有标注语言

@k4yt3x k4yt3x added the enhancement New feature or request label May 23, 2020
@Jamesits
Copy link
Member

就代码块标注语言这个问题,我是觉得如果高亮比较糟糕那么不如没有,所以对于非传统意义的编程语言的代码块都没写(就只是当 <pre> 用)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants