Docsify: include more than one file will cause error

Created on 19 Mar 2020  路  5Comments  路  Source: docsifyjs/docsify




Bug Report

Steps to reproduce

  • In one markdown file, use more than one "include", like:
# something before

[file1](test.assets/file1.html  ':include :type=iframe width=100% height=500px')
[file2](test.assets/file2.html  ':include :type=iframe width=100% height=500px')

# something after

What is current behaviour

  • While include only one file, display is all good.
  • But if include two, the whole page will only display the 2nd iframe. Other parts of markdown will disappear.
  • Actually, if include more than one, it always show the last iframe only.

What is the expected behaviour

Other relevant information

  • [ ] Bug does still occur when all/other plugins are disabled?
  • Your OS:
  • Node.js version:
  • npm/yarn version:
  • Browser version:
  • Docsify version: 4.11.2
  • Docsify plugins:

wontfix

All 5 comments

can you try without the height property !?

| iframe1 height | iframe2 height | iframe1 display | iframe2 display | other elements |
|-|-|-|-|-|
| 500px | 500px | none | 500px | none |
| 500px | none | none | ~100px| none|
| none | 500px | none | 500px | none |
| none | none| none | ~100px| none|

There's only one time, I keep the "height" of 1st one and remove the 2nd, both iframe display and the 2nd looks 100px height. But I can not replay it, maybe cause by cache or some details different in code, I'm not sure.

this needs investigation

feel free to investigate and submit the fix.

It will take time for me as I am quite busy with some other stuff.

  • Actually, if include more than one, it always show the last iframe only.

sounds similar to what I faced in #1078 so it's probably the same issue
unfortunately it is not critical for my stuff now so I have not taken a look yet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jhildenbiddle picture jhildenbiddle  路  3Comments

nothingrandom picture nothingrandom  路  5Comments

timrossback picture timrossback  路  3Comments

petrdvorak picture petrdvorak  路  3Comments

toavinar picture toavinar  路  3Comments