hexo-theme-next
hexo-theme-next copied to clipboard
<tr> tag with class="header" displayed incorrectly
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
Issue Checklist
- [x] I am using the latest version of NexT.
- [x] I have read the relevant documents of Hexo and NexT.
- [x] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.
Expected behavior
The following normal table will be rendered to this html code by hexo-renderer-pandoc.
| A| B |
| :-: | :-: |
|A1| B1|
|A2| B2|
...
|A3| B3|
<div class="table-container"><table>
<colgroup>
<col style="width: 16%">
<col style="width: 83%">
</colgroup>
<thead>
<tr class="header">
<th style="text-align: center;">A</th>
<th style="text-align: center;">B</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"> A1</td>
<td style="text-align: center;"> B1</td>
</tr>
<tr class="even">
<td style="text-align: center;">A2</td>
<td style="text-align: center;"> B2</td>
</tr>
......
<tr class="odd">
<td style="text-align: center;">AN</td>
<td style="text-align: center;">BN</td>
</tr>
</tbody>
</table></div>
And should be displayed like this.
Actual behavior
Steps to reproduce the behavior
- use npm to uninstall hexo-renderer-marked and install hexo-renderer-pandoc.
- render a markdown table, then you will get the wrong display in your web page.
- remove the class="header" in
tag like the following html code, then it seems to be ok. <div class="table-container"><table> <colgroup> <col style="width: 16%"> <col style="width: 83%"> </colgroup> <thead> <tr> <th style="text-align: center;">A</th> <th style="text-align: center;">B</th> </tr> </thead> <tbody> <tr class="odd"> <td style="text-align: center;"> A1</td> <td style="text-align: center;"> B1</td> </tr> <tr class="even"> <td style="text-align: center;">A2</td> <td style="text-align: center;"> B2</td> </tr> ...... <tr class="odd"> <td style="text-align: center;">AN</td> <td style="text-align: center;">BN</td> </tr> </tbody> </table></div>
Environment Information
Node.js and NPM Information
v16.15.1 8.11.0
Package dependencies Information
[email protected] C:\path\to\dir ├── @next-theme/[email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]
Thanks for opening this issue, maintainers will get back to you as soon as possible!