小智 8
另一个答案的修改版本确实可以在 Github 上获得并排语法突出显示:
# Document Title
The usual [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
does not cover some of the more advanced Markdown tricks, but here
is one. You can combine verbatim HTML with your Markdown.
This is particularly useful for tables.
Notice that with **empty separating lines** we can use Markdown inside HTML:
<table>
<tr>
<th>Json 1</th>
<th>Markdown</th>
</tr>
<tr>
<td>
```json
{
"id": 1,
"username": "joe",
"email": "joe@example.com",
"order_id": "3544fc0"
}
```
</td>
<td>
```json
{
"id": 5,
"username": "mary",
"email": "mary@example.com",
"order_id": "f7177da"
}
```
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
演示:https://gist.github.com/nottheswimmer/7837eec10fac0d1197fc5a8bfc0b96f3
无法使用裸 Markdown 语法在单个表格单元格中创建多行代码块 - 但您可以使用逐字 HTML 来完成此操作。这是一个带有并排代码的两列表格示例(请注意,此 HTML 与 Markdown 的其余部分并排):
# Document Title
The usual [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
does not cover some of the more advanced Markdown tricks, but here
is one. You can combine verbatim HTML with your Markdown.
This is particularly useful for tables.
Notice that with **empty separating lines** we can use Markdown inside HTML:
<table>
<tr>
<th>Json 1</th>
<th>Markdown</th>
</tr>
<tr>
<td>
<pre>
{
"id": 1,
"username": "joe",
"email": "joe@example.com",
"order_id": "3544fc0"
}
</pre>
</td>
<td>
```json
{
"id": 5,
"username": "mary",
"email": "mary@example.com",
"order_id": "f7177da"
}
```
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
呈现为:

| 归档时间: |
|
| 查看次数: |
1651 次 |
| 最近记录: |