【发布时间】:2022-08-09 10:13:52
【问题描述】:
我的文档中有如下降价表:
+----------------------+----------------------------------------------+
| `code` | *italics* |
+======================+==============================================+
| `more code` | | column 1 | column 2 | column 3 | |
| | |----------|----------|----------| |
| | | abcd | efg | hijk | |
| | | lmnop | qrs | tuv | |
| | | wx | y | z | |
+----------------------+----------------------------------------------+
| `even more code` | Regular text that spans multiple lines |
| | within this cell. |
| | |
| | |
+----------------------+----------------------------------------------+
| **bold** | Regular text that spans multiple lines |
| | within this cell. |
| | |
| | **bolded text in a separate paragraph.** |
+----------------------+----------------------------------------------+
是否有某种方式(例如使用插件)可以让 Mkdocs 将其呈现为生成的 HTML 中的表格?
上表可以根据需要重新格式化,但最终它需要支持包含任意降价的表格单元格,允许嵌套表格、跨多行的段落、斜体等。
值得注意的是,Pandoc supports this Markdown format。也许我可以连接到 Mkdoc(例如,通过制作我自己的插件)来使用 Pandoc 的语法来呈现 markdown。
我想避免编写内联 HTML。
-
检查this list Python-Markdown(MkDocs 使用的 Markdown 解析器)的已知扩展。也许其中一个会为您提供解决方案。
标签: formatting markdown mkdocs