語法速查
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 — 編輯磁碟裡現有的檔案。