Visual studio code 如何在vscode扩展的README.md中插入表?
我想在Visual studio code 如何在vscode扩展的README.md中插入表?,visual-studio-code,doc,readme,Visual Studio Code,Doc,Readme,我想在README.md中为vscode扩展插入表。我的代码如下: * some title | words | transform to | keepUpperCase is false | keepUpperCase is true | |--------------------|--------------|------------------------|-----------------------| | "XML HTTP reques
README.md
中为vscode
扩展插入表。我的代码如下:
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
在github
和visual studio marketplace overview中的结果与预期一致,但在由vscode
打开的extension overview中的结果如下:
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
- 一些头衔
|单词|转换为| Keepippercase为假| Keepippercase为真|
|--------------------|--------------|------------------------|-----------------------|
|“XML HTTP请求”| pascalCase |
|XmlHttpRequest
|XmlHttpRequest
|“新客户ID”| camelCase |
|newCustomerId
|newCustomerId
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
* some title
| words | transform to | keepUpperCase is false | keepUpperCase is true |
|--------------------|--------------|------------------------|-----------------------|
| "XML HTTP request" | pascalCase | `XmlHttpRequest` | `XMLHTTPRequest` |
| "new customer ID" | camelCase | `newCustomerId` | `newCustomerID` |
该表按预期呈现。但是我将以这种方式丢失文档层次结构。有不同的降价风格,每个降价风格可以呈现不同的效果 Visual Studio代码的内置标记引擎使用以下中提到的标记规范: VS代码是否支持GitHub风格的降价 否,VS代码使用库以降价规范为目标。GitHub正在向CommonMark规范迈进,您可以 阅读这篇文章
如中所述,如果您的目标是特定平台(在您的案例中是Github),则可以安装一个扩展,该扩展可以更改内置的降价预览以匹配目标平台的样式。例如,您可以安装建议的,这样您的预览将与Github中的预览相同。有不同风格的标记,每个标记可以呈现不同的效果 Visual Studio代码的内置标记引擎使用以下中提到的标记规范: VS代码是否支持GitHub风格的降价 否,VS代码使用库以降价规范为目标。GitHub正在向CommonMark规范迈进,您可以 阅读这篇文章
如中所述,如果您的目标是特定平台(在您的案例中是Github),则可以安装一个扩展,该扩展可以更改内置的降价预览以匹配目标平台的样式。例如,您可以安装建议的,这样您的预览将与Github中的预览相同。我最终解决了内联html的问题:
* some title
<table>
<thead>
<tr>
<th>words</th>
<th>transform to</th>
<th>keepUpperCase is false</th>
<th>keepUpperCase is true</th>
</tr>
</thead>
<tbody>
<tr>
<td>"XML HTTP request"</td>
<td>pascalCase</td>
<td><code>XmlHttpRequest</code></td>
<td><code>XMLHTTPRequest</code></td>
</tr>
<tr>
<td>"new customer ID"</td>
<td>camelCase</td>
<td><code>newCustomerId</code></td>
<td><code>newCustomerID</code></td>
</tr>
</tbody>
</table>
我终于用内联html解决了这个问题:
* some title
<table>
<thead>
<tr>
<th>words</th>
<th>transform to</th>
<th>keepUpperCase is false</th>
<th>keepUpperCase is true</th>
</tr>
</thead>
<tbody>
<tr>
<td>"XML HTTP request"</td>
<td>pascalCase</td>
<td><code>XmlHttpRequest</code></td>
<td><code>XMLHTTPRequest</code></td>
</tr>
<tr>
<td>"new customer ID"</td>
<td>camelCase</td>
<td><code>newCustomerId</code></td>
<td><code>newCustomerID</code></td>
</tr>
</tbody>
</table>
“按预期呈现的表”听起来像是您回答了问题。“失去文档层次结构”对您意味着什么?@soulshined我的意思是,后面的代码可以呈现普通的表,但没有缩进。我想要缩进。“表按预期呈现”听起来像是你回答了问题。“失去文档层次结构”对您意味着什么?@soulshined我的意思是,后面的代码可以呈现普通的表,但没有缩进。我要缩进。