Skip to content

Two ':include's directly after one-another cause the second one to go missing #2648

@Stausssi

Description

@Stausssi

Description

First of all, thanks for this amazing project!

I use ':include' to include badges onto READMEs and I've observed that if I use

[](_badges/_foo.md ':include')
[](_badges/_bar.md ':include')

the contents of _badges/_bar.md (the second include) are not displayed and also not part of the HTML document.
Adding a newline in between the two includes fixes the issue, but adds a linebreak in the rendered document:

[](_badges/_foo.md ':include')

[](_badges/_bar.md ':include')

Replacing the ':include's with the actual contents, e.g.

[![Foo Badge](https://img.shields.io/badge/foo-badge-blue?style=for-the-badge)](/index.md)
[![Bar Badge](https://img.shields.io/badge/bar-badge-blue?style=for-the-badge)](/other_page.md)

displays both badges next to each other without a linebreak (desired behavior).

Expected behavior

The output should be the same when using ':include'.

Actual behavior

The second ':include' is discarded unless an explicit linebreak is added.

Steps to reproduce

  1. Create two markdown files for the badges (one each)
  2. Create another markdown file that ':include's them without a newline in between
  3. Second badge is missing

Environment

Docsify version: 5.0.0-rc

Additional Information

  • Bug still occurs when all/other plugins are disabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triagebugconfirmed as a bugv5-rcv5 rc version related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions