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

Duplicate TOC entries when compiling MD files from several JSONs in single JS #27

Open
pharaoh1st opened this issue Feb 10, 2021 · 0 comments

Comments

@pharaoh1st
Copy link

fs.readdirSync("./").filter(f => f.toLowerCase().endsWith(".json")).forEach(function(markdownJson) {
  markdownInclude.compileFiles(markdownJson).then(function () {
    console.info(markdownJson + ' have been built successfully');
  })
});

Example:
There are 3 JSON files in the directory with different files for compilation. But some of the MD files are reused in different compiled MD files.

1st.md content

#include my.md

2nd.md content

#include my.md
#include my2.md

3rd.md content

#include my.md
#include my3.md

my2.md content

some content about my2.
#include my3.md

every MD file has it's own unique Heading with !heading tag for inclusion into TOC.

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

No branches or pull requests

1 participant