hexo-theme-redefine icon indicating copy to clipboard operation
hexo-theme-redefine copied to clipboard

[BUG] notel块和folding块无法正确渲染Markdown表格.

Open Coast23 opened this issue 9 months ago • 3 comments

提交前检查

Bug 描述

notel块和folding块中无法正确渲染Markdown表格, 部分CSS样式未在notel和folding块中生效.

可以说和 #379 一样.

复现步骤

{% folding green::"Test #1" %}

| head1 | head2 |
|-------|-------|
| cell1 | cell2 |
| cell3 | cell4 |

{% endfolding %}

{% notel info fa-circle-info "Test #2" %}

| head1 | head2 |
|-------|-------|
| cell1 | cell2 |
| cell3 | cell4 |

{% endnotel %}

Image

Image

预期行为

表格应该被正确渲染.

截图

Image

相关日志输出


使用的浏览器

No response

操作系统

None

浏览器版本

No response

优先级

中(尽快解决)

其他信息

除了表格外, 应该有其它的样式也无法在notel块、folding块等 中渲染. 但目前还未在写作中发现.

Coast23 avatar Feb 22 '25 17:02 Coast23

不是修复了吗?

fenychn0206 avatar Feb 28 '25 12:02 fenychn0206

不是修复了吗?

执行过

npm install hexo-theme-redefine@latest

了, 主题版本为v2.8.2, 仍然无法渲染.

Coast23 avatar Mar 02 '25 04:03 Coast23

一个暂时的解决方案是在文章中插入CSS:

<style>
    .note-large .notel-content table {
        border-spacing: 0;
        border-collapse: collapse;
        width: 100%;
        overflow: auto;
        margin-bottom: 1.2rem;
        box-shadow: var(--redefine-box-shadow-flat);
        border-radius: 14px;
    }

    .note-large .notel-content table thead th {
        border-bottom: 1px solid var(--shadow-color-1);
        background-color: var(--third-background-color) !important;
    }

    .note-large .notel-content table thead th:first-child {
        border-top-left-radius: 14px;
    }

    .note-large .notel-content table thead th:last-child {
        border-top-right-radius: 14px;
    }

    .note-large .notel-content table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 14px;
    }

    .note-large .notel-content table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 14px;
    }

    .note-large .notel-content table td,
    .note-large .notel-content table th {
        padding: 8px 16px;
        border-left: 1px solid var(--shadow-color-1);
    }

    .note-large .notel-content table td:first-child,
    .note-large .notel-content table th:first-child {
        border-left: none;
    }

    .note-large .notel-content table tr {
        background-color: var(--background-color);
    }

    .note-large .notel-content table tr:nth-child(2n) {
        background-color: var(--second-background-color);
    }
</style>

还是希望能尽早修复.

Coast23 avatar Mar 02 '25 04:03 Coast23

已修复,请更新主题

EvanNotFound avatar Jul 16 '25 20:07 EvanNotFound