honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block conflict with multiple plugins

coderjinhui opened this issue · comments

Summary

Always return 1 plugin when use multiple plugins with the same block.

  • HonKit version: 5.1.4

Step to reproduce

  1. npm install package: honkit-plugin-prism and gitbook-plugin-mermaid-wnew
  2. use the plugin in book.json
{
    "plugins": [
        "mermaid-wnew",
        "prism"
    ]
}
  1. set debug point to listBlocks, then you will see it will always return the first plugin for code block

Expected results

  • will generate the svg for mermaid code block
  • will highlight other code block

Actual results

always do the first plugin for the same block:

  • if mermaid-wnew before prism, it will generate the svg but all other code block will miss the highlight
  • if prism before mermaid-wnew, all the other code block will highlight but will not generate svg