Markdown 分割线语法
要创建分割线,请在单独一行上使用三个或多个星号 (***
)、破折号 (---
) 或下划线 (___
) ,并且不能包含其他内容。
***
---
_________________
以上三个分隔线的渲染效果看起来都一样:
分割线(Horizontal Rule)用法最佳实践
为了兼容性,请在分隔线的前后均添加空白行。否则,在某些情况下,破折号可能会被解析为标题标记。
✅ Do this | ❌ Don't do this |
---|---|
Try to put a blank line before...
---
...and after a horizontal rule. | Without blank lines, this would be a heading.
---
Don't do this! |
错误写法的渲染效果如下:
Without blank lines, this would be a heading.
Don't do this!