Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<tr> tag with class="header" displayed incorrectly #1725

Open
3 tasks done
ytf4425 opened this issue Apr 5, 2023 · 1 comment
Open
3 tasks done

<tr> tag with class="header" displayed incorrectly #1725

ytf4425 opened this issue Apr 5, 2023 · 1 comment
Labels

Comments

@ytf4425
Copy link

ytf4425 commented Apr 5, 2023

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

  • I am using the latest version of NexT.
  • I have read the relevant documents of Hexo and NexT.
  • 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

  1. use npm to uninstall hexo-renderer-marked and install hexo-renderer-pandoc.
  2. render a markdown table, then you will get the wrong display in your web page.
  3. 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]
@ytf4425 ytf4425 added the Bug label Apr 5, 2023
@welcome
Copy link

welcome bot commented Apr 5, 2023

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang referenced this issue in next-theme/hexo-theme-next Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant