Skip to content

<!-- {docsify-ignore} --> sometimes being ignored #1355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
jesobreira opened this issue Aug 25, 2020 · 4 comments
Open
1 task done

<!-- {docsify-ignore} --> sometimes being ignored #1355

jesobreira opened this issue Aug 25, 2020 · 4 comments
Labels

Comments

@jesobreira
Copy link

Bug Report

Steps to reproduce

Run the script with the following README.md:

# Heading 1

Test

## Heading 2

### Heading 3A

Lorem ipsum

#### Heading 4A <!-- {docsify-ignore} -->

##### Heading 5A

###### Heading 6A

Lorem ipsum

### Heading 3B

Lorem ipsum

#### Heading 4B <!-- {docsify-ignore} -->

##### Heading 5B

Lorem ipsum

index.html:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Test</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: '',
      repo: ''
    }
  </script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
</body>
</html>

What is current behaviour

Heading 4A and its children get hidden, but Heading 4B doesn't.

What is the expected behaviour

Heading 4A and Heading 4B get hidden.

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS Catalina

  • Node.js version: 12.18.3

  • npm/yarn version: 6.14.6

  • Browser version: Chrome Version 84.0.4147.135 (Official Build) (64-bit)

  • Docsify version: 4.11.6

  • Docsify plugins: none

Please create a reproducible sandbox

https://codesandbox.io/s/gallant-leaf-bz9n4

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

@sy-records
Copy link
Member

sy-records commented Aug 26, 2020

You need to add configuration items.

  1. index.html
  window.$docsify = {
    loadSidebar: true,
    subMaxLevel: 6,
  };
  1. _sidebar.md
- [README](README.md)

@jesobreira
Copy link
Author

I'm not using a custom _sidebar.md, rather I'm trying to use the auto-generated table of contents. Does it make any difference?

@sy-records
Copy link
Member

The auto-generated one only supports ignoring one, any ideas? cc @docsifyjs/reviewers

@anikethsaha
Copy link
Member

It looks like a bug to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants