我正在使用标记,它支持 github 风格的降价。这包括表格支持:
var marked = require('marked');
var markdown = `
| API | Documented CSP Policy |
| ------------- |:-------------:|
|Google Fonts|No documented policy|
|Mixpanel|No documented policy|
|Ractive.js|[Documented policy](http://docs.ractivejs.org/edge/csp)|
|Stripe|[Documented policy](https://support.stripe.com/questions/what-about-pci-dss-3-1)|
`
console.log(marked(markdown));
然而,输出有一堆不必要的内联样式:
<table>
<thead>
<tr>
<th>API</th>
<th style="text-align:center">Documented CSP Policy</th>
</tr>
</thead>
<tbody>
<tr>
<td>Google Fonts</td>
<td style="text-align:center">No documented policy</td>
</tr>
<tr>
<td>Mixpanel</td>
<td style="text-align:center">No documented policy</td>
</tr>
(etc etc)
如何在不添加 CSS 的情况下标记为只呈现 HTML?