markdown-formatting

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

General

通用规范

  • No table of contents unless specifically requested.
  • 除非有明确要求,否则不要添加目录。

Code Blocks

代码块

All code blocks must include a language tag and a Torchlight flag.
FlagDescription
+code
Source code only (syntax highlighted)
+demo
Preview + code (always visible)
+demo-folded
Preview + code + collapsible
Other flags (
+preview
,
+collapse
,
output
) exist but are less common — only use when requested.
所有代码块必须包含语言标签和Torchlight标识。
标识说明
+code
仅源代码(语法高亮)
+demo
预览+代码(始终可见)
+demo-folded
预览+代码+可折叠
其他标识(
+preview
+collapse
output
)存在但不常用,仅在有要求时使用。

Language Tags

语言标签

Use ForTag
Directory trees, shell commands
```bash +code
Blade templates
```html +code-blade
适用场景标签
目录树、shell命令
```bash +code
Blade模板
```html +code-blade

Demo-Folded Attributes

Demo-Folded 属性

When using
+demo-folded
, apply demo attributes intentionally:
  • class="..."
    — outer demo wrapper styling
  • preview-class="..."
    — preview-only layout or styling
Example opening tag:
markdown
```html +demo-folded class="bx" preview-class="grid gap lg:cols-3"
<div class="example">Content here</div>
使用
+demo-folded
时,请针对性设置demo属性:
  • class="..."
    — demo外层容器样式
  • preview-class="..."
    — 仅预览区域的布局或样式
示例开头标签:
markdown
```html +demo-folded class="bx" preview-class="grid gap lg:cols-3"
<div class="example">Content here</div>

Horizontal Rules

水平分隔线

Use 80 hyphens as a visual section separator in long documents when a
---
thematic break is not appropriate:
--------------------------------------------------------------------------------
---
主题分隔符不适用时,在长文档中使用80个连字符作为视觉段落分隔符:
--------------------------------------------------------------------------------

Lists

列表

  • Use hyphens
    -
    for unordered lists
  • Use
    1.
    2.
    for ordered steps
  • 4-space indentation for nested items
  • 无序列表使用连字符
    -
  • 有序步骤使用
    1.
    2.
    格式
  • 嵌套项使用4空格缩进

Tables

表格

Standard GitHub Flavored Markdown. Keep column separators aligned.
ColumnTypeNullableDefault
idbigintNoAUTO
namevarchar(255)No-
采用标准GitHub Flavored Markdown格式,保持列分隔符对齐。
列名类型可空默认值
idbigintAUTO
namevarchar(255)-

Linting

语法检查

  • Blank line before and after headings, code blocks, and lists
  • No trailing spaces
  • Single blank line between sections — not double
  • 标题、代码块和列表前后需各留一个空行
  • 不要有尾随空格
  • 段落之间仅保留单个空行,不要使用双空行