Skip to content

[bug] hexo-renderer-pandoc 嵌套容器渲染问题 #4

@weekdaycare

Description

@weekdaycare

检查清单

  • 已经阅读过 官方文档 相关内容,并尝试进行搜索。
  • 尝试过在本地测试运行官方 demo 源码。
  • 尝试过在 Codespace 中测试运行官方 demo 源码。

问题描述

在使用hexo-renderer-pandoc渲染时,对于嵌套容器类插件的渲染不兼容,其会在嵌套的标签中加入 data 属性导致js脚本无法读取正确的数据
eg:

{% folding 多彩标记 %}
{% timeline api:https://api.github.com/repos/xaoxuu/blog-timeline/issues?direction=asc&per_page=3 %}{% endtimeline %}
{% endfolding %}

使用 hexo-render-markdown-it 的渲染结果为

<details class="tag-plugin colorful folding" open="">
  <summary><span>多彩标记</span></summary>
  <div class="body">
    <div class="tag-plugin timeline ds-timeline" lazyload="" api="https://api.github.com/repos/xaoxuu/blog-timeline/issues?direction=asc&amp;per_page=3"></div> 
  </div>
</details>

而 hexo-renderer-pandoc 的渲染结果为

<details class="tag-plugin colorful folding" open="">
  <summary><span>多彩标记</span></summary>
  <div class="body">
    <div class="tag-plugin timeline ds-timeline" data-lazyload="" data-api="https://api.github.com/repos/xaoxuu/blog-timeline/issues?direction=asc&amp;per_page=3"></div> 
  </div>
</details>

由于增加了额外的 data 导致 url 无法正确读取

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwont fixcan't fix

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions