pypandoc html to md table



我正在尝试使用pypandoc将HTML转换为md markdown(用于Hugo)。下面的基本表:

<table >
<tbody>
<tr >
<td >Case&#160;ID</td>
<td >Internal&#160;ID</td>
<td >CVE&#160;ID</td>
<td >Description</td>
</tr>
<tr >
<td >01144864<br />01153461<br />01140233<br />01145760<br />01147797</td>
<td >RDST-30212 RDST-30213<br /></td>
<td >CVE-2019-17569 <br />CVE-2020-1935<br />CVE-2019-17569</td>
<td >Apache Tomcat vulnerabilities are fixed with the upgrade of the Apache Tomcat library to 7.0.103.</td>
</tr>
<tr >
<td >01055204</td>
<td >RDST-19886</td>
<td >CWE-757</td>
<td >
<p><strong>Issue:</strong> Previously, TLS Fallback Signaling Cipher Suite Value (SCSV) was not supported and this posed a risk of client-side or server-side protocol downgrade.<br /></p>
<p><strong>Resolution:</strong> Now, with the update to Java 11, this issue is fixed.</p>
</td>
</tr>
</tbody>
</table>

markdown中pypandoc的输出如下所示。在Hugo服务器处理之后,它不会转换为表:

+-----------------+-----------------+-----------------+-----------------+
| Case ID         | Internal ID     | CVE ID          | Description     |
+-----------------+-----------------+-----------------+-----------------+
| 01144864       | RDST-30212      | CVE-2019-17569 | Apache Tomcat   |
| 01153461       | RDST-30213     | CVE-2020-1935  | vulnerabilities |
| 01140233       |                 | CVE-2019-17569  | are fixed with  |
| 01145760       |                 |                 | the upgrade of  |
| 01147797        |                 |                 | the Apache      |
|                 |                 |                 | Tomcat library  |
|                 |                 |                 | to 7.0.103.     |
+-----------------+-----------------+-----------------+-----------------+

输出看起来就像md代码,只是全部粘在一起:

+—————–+—————–+—————–+—————–+ | Case ID | Internal ID | CVE ID | Description | +—————–+—————–+—————–+—————–+ | 01144864 | RDST-30212 | CVE-2019-17569 | Apache Tomcat | | 01153461 | RDST-30213 | CVE-2020-1935 | vulnerabilities | | 01140233 | | CVE-2019-17569 | are fixed with | | 01145760 | | | the upgrade of | | 01147797 | | | the Apache | | | | | Tomcat library | | | | | to 7.0.103. | +—————–+—————–+—————–+—————–+ | 01055204 | RDST-19886 | CWE-757 | Issue: | | | | | Previously, TLS | | | | | Fallback | | | | | Signaling | | | | | Cipher Suite | | | | | Value" (SCSV) | | | | | was not | | | | | supported and | | | | | this posed a | | | | | risk of | | | | | client-side or | | | | | server-side | | | | | protocol | | | | | downgrade. | | | | | | | | | | Resolution: | | | | | Now, with the | | | | | update to Java | | | | | 11, this issue | | | | | is fixed. | +—————–+—————–+—————–+—————–+

我现在已经看到(在https://daringfireball.net/projects/markdown/syntax#html),你可以在。md文件中使用html,我想我会坚持。

相关内容

  • 没有找到相关文章

最新更新