是否可以使用 Visual Studio Code Markdown 创建和预览 table?

Is it possible to create and preview a table using Visual Studio Code Markdown?

我正在使用 Visual Studio 代码使用 its Markdown support. I would like to add some tables, but I can't find a way to do it. It seems that Visual Studio Code implements CommonMark 编写一些注释,规范中不包含 tables。

我知道 GitHub 风格的 Markdown 有 a table extension which provides this feature and there are a couple of table formatter Visual Studio Code extensions (here and here),但它们只是很好地排版文本。我想要 table 显示在预览窗格中。

关于如何在 Visual Studio Code Markdown 中实现一些 table 有什么建议吗?

Markdown rules状态:

For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

For example, to add an HTML table to a Markdown article:

This is a regular paragraph.

<table>
    <tr>
        <td>Foo</td>
    </tr>
</table>

This is another regular paragraph.

Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

您现在可以这样做:

| Letter | Digit | Character |
| :----: | :---: | :-------: |
| a      | 4     | $         |
|        | 365   | (         |
| b      |       | ^         |

“空”单元格中必须至少有一个 space。这将在 vscode 的降价预览中显示为: