Skip to content
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

[[toc]] renders empty with cutomization in config.js #1461

Open
danrocha opened this issue Mar 19, 2019 · 1 comment
Open

[[toc]] renders empty with cutomization in config.js #1461

danrocha opened this issue Mar 19, 2019 · 1 comment
Labels
type: bug Something isn't working

Comments

@danrocha
Copy link

  • [x ] I confirm that this is an issue rather than a question.

Bug report

When I include the following configuration in the config.js file:

markdown: {
    toc: {
      includeLevel: [2]
    }
  }

The [[toc]] in my .md files renders empty, even though the page is full of <h2> headings:

<div class="table-of-contents"> <ul></ul> </div>

If I remove the extra configuration, it works fine, but renders both <h2> and <h3> (as expected, but not desired).

Version

1.0.0-alpha.44

Steps to reproduce

Repo: https://github.com/danrocha/tfa-vuepress

Add and remove the configuration above in config.js and check the rendered page, for example, http://localhost:8080/guides/dubai/#buildings (right below the map).

What is expected?

To have a Table of Contents with only <h2> level headings displayed.

What is actually happening?

The Table of Contents div renders empty.

Other relevant information

  • Your OS: macOS Mojave 10.14.3 (18D109)
  • Node.js version: 11.6.0
  • Browser version: Chrome Canary Version 75.0.3736.0 (Official Build) canary (64-bit)
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? yes
@shigma
Copy link
Collaborator

shigma commented Mar 19, 2019

Sorry to hear that.

It's a known issue introduced by 1.0.0-alpha.41. I will fix it in several weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants