question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some problem with generating TOC

See original GitHub issue

I’m experiencing some strange bug with that one. Do you have some ideas?

Im just setting <!-- toc --> as needed, run verb, then generated table of contents not includes the headings generated from apidocs which actually, is links. I have some heading on same level after the apidocs and it is included.

It’s not markdown-toc related, i checked.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jonschlinkertcommented, May 13, 2016

Cool, this works when a heading is a template (but maybe not in code comments yet, I have an idea for that too):

Inside verb-toc, I’ll add this:

    opts.linkify = function(token, name, slug) {
      if (/^[{<]%?/.test(name)) {
        var view = app.view('temp', {content: name});
        view.compile(opts);
        token.content = view.fn(app.cache.data);
        token.slug = toc.linkify(token.content);
      }
      return token;
    };

So it will actually try to render the string. But it will error if the context doesn’t exist yet… catch 22

1reaction
jonschlinkertcommented, May 13, 2016

It’s not related to async or anything like that. The output is correct since the code comments aren’t rendered yet when the toc is generated, so this is really a code comments issue and/or a helper-apidocs issue. When I get the new comments stuff pushed up it will resolve this. Give me some time though, I’m doing everything I can to wrap up generate and verb. The comments are the very next thing on the list (you’ll like what I’m doing with them 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table of Contents generation problems! - Microsoft Community
Table of Contents generation problems ! I have a 33 page document in Word 2016 which includes 22 Headings (all of the same...
Read more >
Problems with TOC Styles (Microsoft Word) - Word Ribbon Tips
When the TOC is generated, the styles automatically applied to the TOC entries are TOC 1, TOC 2, etc. There is typically a...
Read more >
MS Word - Table of Contents Problem Solving - Fusion IT
Error 2: TOC does not display all Heading levels i.e. level 1 is displayed but not a subheading. Identify: This could be related...
Read more >
Theory of Constraints (TOC) - Lean Production
The underlying power of TOC flows from its ability to generate a tremendously strong focus towards a single goal (profit) and to removing...
Read more >
Troubleshooting TOCs and lists
Learn to troubleshoot TOCs and lists in Adobe FrameMaker. ... Avoid using forced returns in a heading; forced returns appear in the generated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found