|
| 1 | +Here's a stress test for your markdown renderer: |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +### Feature Matrix |
| 6 | + |
| 7 | + |
| 8 | +| Feature | Status | Docs | |
| 9 | +|---------|--------|------| |
| 10 | +| **Bold** & *Italic* | ✅ Done | [spec](https://spec.commonmark.org/0.31.2/#emphasis-and-strong-emphasis-with-asterisks-and-underscores-rule-1-through-17) | |
| 11 | +| ~~Strikethrough~~ | ⚠️ Partial | [GFM](https://github.github.com/gfm/#strikethrough-extension-with-tildes-and-double-tildes-for-del-elements) | |
| 12 | +| `inline code` | ✅ Done | [ref](https://spec.commonmark.org/0.31.2/#code-spans-backtick-strings-and-their-matching-rules-for-inline-code) | |
| 13 | +| Nested lists | 🔧 WIP | [deep](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#nested-lists-ordered-and-unordered-mixing-indentation-levels) | |
| 14 | + |
| 15 | +### Alignment Torture |
| 16 | + |
| 17 | +| Left | Center | Right | Mixed | |
| 18 | +|:-----|:------:|------:|-------| |
| 19 | +| `vim.api` | **strong** | 42 | [API](https://neovim.io/doc/user/api.html#nvim_buf_set_lines()-nvim_buf_get_lines()-and-other-buffer-manipulation-functions) | |
| 20 | +| `vim.lsp` | *emphasis* | 3.14 | [LSP](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion_resolve_and_other_request_types) | |
| 21 | +| `vim.treesitter` | ***both*** | 0xDEAD | [TS](https://tree-sitter.github.io/tree-sitter/using-parsers/queries/pattern-matching-with-predicates-and-anchors#the-match-predicate) | |
| 22 | + |
| 23 | +### Nested Structures |
| 24 | + |
| 25 | +1. **First level** |
| 26 | + - Bullet with `code` and [a link](https://example.com) |
| 27 | + - Another bullet |
| 28 | + 1. Ordered inside unordered |
| 29 | + 2. With a table inside: |
| 30 | + |
| 31 | + | Key | Val | |
| 32 | + |-----|-----| |
| 33 | + | `a` | 1 | |
| 34 | + |
| 35 | + 3. Back to the list |
| 36 | + - > A blockquote inside a list item |
| 37 | + > spanning multiple lines |
| 38 | +2. **Second level** — with a long code block: |
| 39 | + |
| 40 | + ````lua |
| 41 | + local M = {} |
| 42 | + -- nested code fences should survive |
| 43 | + function M.setup(opts) |
| 44 | + opts = vim.tbl_deep_extend("force", { |
| 45 | + enabled = true, |
| 46 | + style = { bold = true, italic = false }, |
| 47 | + }, opts or {}) |
| 48 | + return opts |
| 49 | + end |
| 50 | + return M |
| 51 | + ```` |
| 52 | + |
| 53 | +3. ***Third*** with a task list: |
| 54 | + - [x] Completed task |
| 55 | + - [ ] Pending task |
| 56 | + - [ ] Another one |
| 57 | + |
| 58 | +### Inline Chaos |
| 59 | + |
| 60 | +This paragraph has **bold**, *italic*, ***bold-italic***, `inline code`, ~~deleted~~, and [a very descriptively titled link](https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz#some-very-long-anchor-fragment-that-keeps-going-and-going-forever) all in one sentence. |
| 61 | + |
| 62 | +### Fenced Blocks Parade |
| 63 | + |
| 64 | +````python |
| 65 | +# Python |
| 66 | +def f(x: int) -> dict[str, list[int]]: |
| 67 | + return {"result": [i**2 for i in range(x)]} |
| 68 | +```` |
| 69 | + |
| 70 | +````bash |
| 71 | +# Shell with pipes |
| 72 | +cat /proc/cpuinfo | grep -i "model name" | head -1 | awk -F: '{print $2}' |
| 73 | +```` |
| 74 | + |
| 75 | +````json |
| 76 | +{ |
| 77 | + "nested": { "deep": { "value": [1, 2, 3] } }, |
| 78 | + "escaped": "quotes \"inside\" strings" |
| 79 | +} |
| 80 | +```` |
| 81 | + |
| 82 | +### Horizontal Rules vs. Table Edges |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +| Single col | |
| 87 | +|------------| |
| 88 | +| lonely | |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +> ### Blockquote with heading |
| 93 | +> And a table: |
| 94 | +> |
| 95 | +> | A | B | |
| 96 | +> |---|---| |
| 97 | +> | 1 | 2 | |
| 98 | +> |
| 99 | +> And some `code` too. |
| 100 | +
|
| 101 | +### Math-ish (if supported) |
| 102 | + |
| 103 | +Euler: $e^{i\pi} + 1 = 0$ |
| 104 | + |
| 105 | +$$ |
| 106 | +\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} |
| 107 | +$$ |
| 108 | + |
| 109 | +--- |
0 commit comments