signalwerk / gatsby-remark-table-of-contents

gatsby remark plugin to generate table of contents
21 stars 10 forks source link

An extra " char #1

Closed panzerdp closed 4 years ago

panzerdp commented 4 years ago

Thanks for creating this plugin!

I've noticed a typo in the wrapper div of table of contents:

markdownAST.children = [].concat(
    markdownAST.children.slice(0, index),
    {
      type: 'html',
      value: '<div class="toc">',
    },
    result.map,
    {
      type: 'html',
      value: '</div">',  // <----------------- Remove "
    },
    markdownAST.children.slice(index + 1)
  );

You should remove " from the closing div: </div">.

signalwerk commented 4 years ago

thank you for the report and the nice words! I just fixed this. Thank you for the finding!

signalwerk commented 4 years ago

Version 0.0.8 should do the trick.