速查表
Markdown 在 mori 里的样子。
左栏是源码,也就是你输入的内容。右栏是 mori 引擎渲染后的效果 — 调用的正是编辑器和应用所用的 render_document。这里没有截图,也没有手写的示例 HTML,因此页面效果始终与产品一致。如果某行显示为纯文本,就说明 mori 暂时还不支持它。
基本语法
最初的那套语法,凡是能读 Markdown 的地方都支持。
Markdown
效果 · 由引擎渲染
标题
标题级别
# Title ## Section ### Subsection
下划线写法
Title ===== Section -------
强调
粗体、斜体、粗斜体
**bold** and *italic*, or ***both***.
行内代码
Run `cargo test --workspace` first.
转义标记符号
\*not italic\* but a literal pair.
强制换行 · 行末加两个空格
First line Second line, same paragraph.
列表
无序列表,含嵌套
- Open a file - Write - Two spaces to nest - And again
有序列表
1. First 2. Second 1. Second, part one
链接与图片
行内链接,可附加标题
[mori](https://motemd.com) [mori](https://motemd.com "Nothing but writing")
尖括号自动链接
<https://motemd.com>
引用式链接
Written in [mori][home]. [home]: https://motemd.com
图片 · 感叹号后接链接

区块
嵌套引用
> The file is the document. > > > And the document is the file.
围栏代码块,指定语言
```rust
fn main() {
println!("hello");
}
```分隔线
Before. --- After.
扩展语法(GFM)
GitHub 风格的扩展语法。文件要放到 GitHub、GitLab 或大多数现代编辑器里,都可以放心用。
表格
竖线与分隔行
| Name | Role | | ----- | -------- | | Jihye | Design | | Harin | Research |
对齐方式 · 分隔行中的冒号
| Left | Centre | Right | | :--- | :----: | ----: | | a | b | 3.50 |
手写表格很快就会让人厌烦。 表格生成器 可以帮你生成并对齐。
任务列表
列表符号后加方括号
- [x] Ship 1.0 for Linux - [ ] Finish the macOS build - [ ] Finish the Windows build
行内扩展
删除线
~~Tabs in 1.0~~ moved to a later release.
直接写网址,自动转为链接
Downloads live at https://motemd.com/download
脚注
标记放在文中,注释放在下方任意位置
Cold start is measured on every release.[^bench] [^bench]: The method is on the benchmarks page.
mori 的补充
GFM 之外的语法。不支持它们的阅读器会将其显示为纯文本,所以用了这些语法,文件依然谁都能打开。
数学公式
行内公式 · 单美元符号
Frame budget follows $t = 1/f$ exactly.
独立公式 · 双美元符号
$$
\sum_{i=1}^{n} \frac{1}{i^2}
$$高亮
高亮
The part that matters is ==zero idle frames==.
在网页编辑器里试试这些语法 — 同一个引擎,无需安装。
将文档转换为 HTML — 生成的代码可直接粘贴。
做表格,不用数竖线 — 设置列和对齐方式,也能粘贴 CSV。
也可以下载 mori — 编辑磁盘上已有的文件。