HTML within markdown files doesn't get rendered
我有一个表,需要在我们的TFS 2017本地存储库的markdown文档中包括一个表。该表需要在其中一列中包含多个由换行符分隔的值。我可以编写它并在Visual Studio Code中使用HTML标记查看预期的结果,但是TFS 2017无法正确呈现它。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Top of the **markdown** file <table> <tr> <th>Key</th> <th>Description</th> <th>Value</th> <th>Example</th> <th>Required</th> </tr> <tr> <td>app-name</td> <td>The name of the application that the resource was provisioned for.</td> <td>The app name is a simplified version of the project-name tag below, if the resource was created for a project. Otherwise, use the product name.</td> <td>foo-bar<br/>product-evaluation</td> <td>If associated to an app, yes.</td> </tr> </table> Bottom of the *markdown* file. |
以上面的markdown文件示例为例,Visual Studio如下所示呈现它:
但是,一旦将其推送到TFS 2017,就根本不会呈现HTML。降价部分仍然可以正确渲染。
这是预期的行为吗?路线图上是否有任何支持Markdown文件中HTML的内容?降价规范支持这一点。如果不支持HTML,我该怎么做才能在标准MD表列中使用换行符?
是的,这是预期的行为。
目前,本地TFS不支持此功能。但是,在VSTS(在线TFS)中,它可以在预览中呈现,但仍不能在仪表板(添加到仪表板)中呈现。
我们尚无公开时间表支持此功能。但是VSTS已经支持预览,所以也许不久将全面支持。您可以在以下位置跟踪功能时间表:https://www.visualstudio.com/en-us/news/release-archive-vso,这是第一时间的更新。
在您的方案中,可以使用Markdown而不是html来呈现表:
您可以通过组合单词列表??并用连字符
分隔每一列来创建表
1 2 3 | | Key | Description | Value | Example |Required | |-----------|:-----------:|-----------:|-----------:|-----------:| | app-name | The name of the application that the resource was provisioned for. |The app name is a simplified version of the project-name tag below, if the resource was created for a project. Otherwise, use the product name. | foo-bar product-evaluation | If associated to an app, yes.| |
有关详细信息,请参阅Markdown文件的语法指南。
此外,TFS 2018中引入了Wiki功能,它支持markdown中的HTML标签。如果可以的话,您可以升级到TFS 2018.