docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.8k stars 5.68k forks source link

After [filename](README.md ':include'), the docsify-tabs plugin in README.md fails #2000

Closed zhangkaiqiu closed 9 months ago

zhangkaiqiu commented 1 year ago

Bug Report

Steps to reproduce

What is current behaviour

What is the expected behaviour

Other relevant information

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

zhangkaiqiu commented 1 year ago

https://codesandbox.io/embed/trusting-engelbart-z6k1zv?fontsize=14&hidenavigation=1&theme=dark

Koooooo-7 commented 1 year ago

Hi @zhangkaiqiu , could plz provide more details about it? I checked the sandbox above. it does show the tabs.

zhangkaiqiu commented 1 year ago

I'm sorry I didn't describe clearly.

When I use the docsify-tab plugin normally, I expect the display to be as follows: image It is like the display effect of google browser tabs.

Its source code is as follows:

<!-- tabs:start -->

#### **English**

Hello!

#### **French**

Bonjour!

#### **Italian**

Ciao!

<!-- tabs:end -->

image

But when I apply it with include: image Its display effect is as follows: image

zhangkaiqiu commented 1 year ago

https://codesandbox.io/embed/eloquent-maxwell-oepc7x?fontsize=14&hidenavigation=1&theme=dark

Koooooo-7 commented 1 year ago

I see, you wanna use :include to get a tab from other md resource. I m not quite sure whether docsify-tab supports it or not.

Hi @jhildenbiddle , could plz you take a look on this?

jhildenbiddle commented 9 months ago

Plugins like docsify-tabs are unable to process embedded markdown content because docsify does not send embedded markdown through the plugin chain. Instead, docsify transforms markdown into HTML and makes that HTML available to plugins only within the afterEach hook.

jhildenbiddle commented 9 months ago

Marking as duplicate of more appropriately named issue: #2373